From: Tang Cheng Date: Tue, 9 Apr 2019 05:10:47 +0000 (+0800) Subject: 更新编译配置,规范版本定义 X-Git-Tag: 1.0.0^2~323 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=e4dd088c225ccd98818873e25171316bb473c5a3;p=epayment%2Ffood_payapi.git 更新编译配置,规范版本定义 --- diff --git a/build.gradle b/build.gradle index dc115a2a..ea080fbb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,16 @@ plugins { - id 'org.jetbrains.kotlin.plugin.jpa' version '1.2.41' - id 'org.springframework.boot' version '2.1.3.RELEASE' id 'war' - id 'org.jetbrains.kotlin.jvm' version '1.2.41' - id 'org.jetbrains.kotlin.plugin.spring' version '1.2.41' + id 'org.springframework.boot' + id 'org.jetbrains.kotlin.jvm' + id 'org.jetbrains.kotlin.plugin.jpa' + id 'org.jetbrains.kotlin.plugin.spring' } apply plugin: 'io.spring.dependency-management' group = 'com.supwisdom' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' +version = payapiVersion +sourceCompatibility = jdkVersion repositories { mavenCentral() @@ -35,13 +35,13 @@ dependencies { compileKotlin { kotlinOptions { freeCompilerArgs = ['-Xjsr305=strict'] - jvmTarget = '1.8' + jvmTarget = jdkVersion } } compileTestKotlin { kotlinOptions { freeCompilerArgs = ['-Xjsr305=strict'] - jvmTarget = '1.8' + jvmTarget = jdkVersion } } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..b59ebeff --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +springbootVersion = 2.1.3.RELEASE +kotlinVersion = 1.2.41 +payapiVersion = 1.0 +jdkVersion = 1.8 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index cbac435e..3a84da46 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,20 @@ pluginManagement { + resolutionStrategy { + eachPlugin { + if (requested.id.namespace != null) { + if (requested.id.namespace.startsWith("org.jetbrains.kotlin")) { + println "Kotlin version $kotlinVersion" + useVersion kotlinVersion + } else if(requested.id.namespace.startsWith("org.springframework")) { + println "Springboot version $springbootVersion" + useVersion springbootVersion + } + } + } + } repositories { gradlePluginPortal() } } rootProject.name = 'dlpay' +