diff --git a/build.gradle b/build.gradle index d551131f..ef3aeb13 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,28 @@ buildscript { + ext { + aliyunMavenUrl = "http://maven.aliyun.com/nexus/content/groups/public" + jacksonVersion = "2.8.9" + junitJupiterVersion = "5.0.0-M4" + junitPlatformVersion = "1.0.0-M4" + kotlinVersion = "1.1.3" + spekVersion = "1.1.2" + + if (project.rootProject.file("private.properties").exists()) { + Properties properties = new Properties() + properties.load(project.rootProject.file("private.properties").newDataInputStream()) + bintrayUserProperty = properties.getProperty("bintrayUser") + bintrayKeyProperty = properties.getProperty("bintrayKey") + } else { + bintrayUserProperty = "" + bintrayKeyProperty = "" + } + } repositories { - //maven { url "http://maven.aliyun.com/nexus/content/groups/public" } + //maven { url aliyunMavenUrl } jcenter() } dependencies { - classpath "org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4" + classpath "org.junit.platform:junit-platform-gradle-plugin:$junitPlatformVersion" classpath "com.novoda:bintray-release:0.5.0" classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.15" } @@ -28,27 +46,9 @@ apply plugin: "org.jetbrains.dokka" group "com.uchuhimo" version "0.1" -ext { - junitJupiterVersion = "5.0.0-M4" - kotlinVersion = "1.1.3" - spekVersion = "1.1.2" - jacksonVersion = "2.8.9" - - if (project.rootProject.file("private.properties").exists()) { - Properties properties = new Properties() - properties.load(project.rootProject.file("private.properties").newDataInputStream()) - bintrayUserProperty = properties.getProperty("bintrayUser") - bintrayKeyProperty = properties.getProperty("bintrayKey") - } else { - bintrayUserProperty = "" - bintrayKeyProperty = "" - } -} - repositories { - //maven { url "http://maven.aliyun.com/nexus/content/groups/public" } + //maven { url aliyunMavenUrl } jcenter() - maven { url 'https://jitpack.io' } } task wrapper(type: Wrapper) { @@ -59,7 +59,7 @@ task wrapper(type: Wrapper) { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinVersion" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" - compile "com.github.uchuhimo:kotlinx-bimap:v0.2" + compile "com.uchuhimo:kotlinx-bimap:0.2" compile "com.typesafe:config:1.3.1" compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" compile "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion" @@ -72,7 +72,7 @@ dependencies { testCompile "com.natpryce:hamkrest:1.4.0.0" testCompile "org.hamcrest:hamcrest-all:1.3" - testRuntime "org.junit.platform:junit-platform-launcher:1.0.0-M4" + testRuntime "org.junit.platform:junit-platform-launcher:$junitPlatformVersion" testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion" testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion" ["spek-api", "spek-data-driven-extension", "spek-subject-extension"].each {