Browse Source

整理 build.gradle

miemie 6 years ago
parent
commit
0e0a25c059

+ 6 - 24
build.gradle

@@ -1,30 +1,12 @@
 buildscript {
     repositories {
         maven { url "https://repo.spring.io/plugins-release" }
+        maven { url "https://plugins.gradle.org/m2/" }
     }
     dependencies {
         classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
         classpath("com.netflix.nebula:gradle-extra-configurations-plugin:4.0.1")
-    }
-}
-
-plugins {
-    id "org.jetbrains.kotlin.jvm" version "1.3.0"
-}
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
-}
-compileKotlin {
-    kotlinOptions {
-        jvmTarget = "1.8"
-    }
-}
-compileTestKotlin {
-    kotlinOptions {
-        jvmTarget = "1.8"
+        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.10")
     }
 }
 
@@ -42,7 +24,8 @@ ext {
     ]
 
     dependencies = [
-        "kotlin-reflect"                    : "org.jetbrains.kotlin:kotlin-reflect:1.2.71",
+        "kotlin-reflect"                    : "org.jetbrains.kotlin:kotlin-reflect:1.3.10",
+        "kotlin-stdlib-jdk8"                : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.10",
         "jsqlparser"                        : "com.github.jsqlparser:jsqlparser:${jsqlparserVersion}",
         "mybatis-spring"                    : "org.mybatis:mybatis-spring:${mybatisSpringVersion}",
         "mybatis"                           : "org.mybatis:mybatis:${mybatisVersion}",
@@ -52,18 +35,18 @@ ext {
         "spring-web"                        : "org.springframework:spring-web:${springVersion}",
         "spring-aop"                        : "org.springframework:spring-aop:${springVersion}",
         "cglib"                             : "cglib:cglib:3.2.6",
+        "lombok"                            : "org.projectlombok:lombok:1.18.4",
 
         "javax.servlet-api"                 : "javax.servlet:javax.servlet-api:4.0.1",
         "aspectjweaver"                     : "org.aspectj:aspectjweaver:1.8.9",
         "mockito"                           : "org.mockito:mockito-core:2.13.0",
         "mybatis-ehcache"                   : "org.mybatis.caches:mybatis-ehcache:1.1.0",
         "slf4j-api"                         : "org.slf4j:slf4j-api:1.7.25",
-        "logback-classic"                   : "ch.qos.logback:logback-classic:1.2.2",
+        "logback-classic"                   : "ch.qos.logback:logback-classic:1.2.3",
         //test
         "spring-test"                       : "org.springframework:spring-test:${springVersion}",
         "junit"                             : "junit:junit:4.12",
         "mockito-all"                       : "org.mockito:mockito-all:1.10.19",
-        "lombok"                            : "org.projectlombok:lombok:1.16.20",
         "fastjson"                          : "com.alibaba:fastjson:1.2.49",
         "jackson"                           : "com.fasterxml.jackson.core:jackson-databind:2.9.6",
         "tomcatjdbc"                        : "org.apache.tomcat:tomcat-jdbc:9.0.2",
@@ -94,7 +77,6 @@ allprojects {
 
 description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
 
-
 configure(subprojects) {
     apply plugin: 'propdeps'
     apply plugin: 'propdeps-maven'

+ 0 - 7
mybatis-plus-annotation/build.gradle

@@ -1,7 +0,0 @@
-apply plugin: 'java'
-
-sourceCompatibility = 1.8
-
-dependencies {
-
-}

+ 1 - 2
mybatis-plus-boot-starter/build.gradle

@@ -2,6 +2,5 @@ dependencies {
     compile project(":mybatis-plus")
     compile rootProject.ext.dependencies["springboot-autoconfigure"]
     compile rootProject.ext.dependencies["springboot-starter-jdbc"]
-    optional rootProject.ext.dependencies["springboot-configuration-processor"]
-
+    compile rootProject.ext.dependencies["springboot-configuration-processor"], optional
 }

+ 0 - 5
mybatis-plus-core/build.gradle

@@ -1,7 +1,3 @@
-apply plugin: 'java'
-
-sourceCompatibility = 1.8
-
 dependencies {
     compile project(":mybatis-plus-annotation")
     compile rootProject.ext.dependencies["mybatis"]
@@ -22,5 +18,4 @@ dependencies {
     testCompile rootProject.ext.dependencies["druid"]
     testCompile rootProject.ext.dependencies["fastjson"]
     testCompile rootProject.ext.dependencies["tomcatjdbc"]
-
 }

+ 2 - 10
mybatis-plus-extension/build.gradle

@@ -1,14 +1,10 @@
-plugins {
-    id "org.jetbrains.kotlin.jvm"
-}
-apply plugin: 'java'
-
-sourceCompatibility = 1.8
+apply plugin: 'org.jetbrains.kotlin.jvm'
 
 dependencies {
     compile project(":mybatis-plus-core")
     compile rootProject.ext.dependencies["mybatis-spring"]
     compile rootProject.ext.dependencies["mybatis"]
+    compile rootProject.ext.dependencies["kotlin-stdlib-jdk8"]
     compile rootProject.ext.dependencies["kotlin-reflect"]
 
     provided rootProject.ext.dependencies["spring-context-support"]
@@ -16,8 +12,6 @@ dependencies {
     provided rootProject.ext.dependencies["javax.servlet-api"]
     provided rootProject.ext.dependencies["slf4j-api"]
 
-
-
     testCompile rootProject.ext.dependencies["spring-web"]
     testCompile rootProject.ext.dependencies["javax.servlet-api"]
     testCompile rootProject.ext.dependencies["spring-test"]
@@ -33,6 +27,4 @@ dependencies {
     testCompile rootProject.ext.dependencies["postgresql"]
     testCompile rootProject.ext.dependencies["oracle"]
     testCompile rootProject.ext.dependencies["mysql"]
-
-
 }

+ 3 - 3
mybatis-plus/build.gradle

@@ -2,8 +2,8 @@ dependencies {
     compile project(":mybatis-plus-extension")
     compile project(":mybatis-plus-generator")
 
-    testCompile 'org.springframework:spring-web:4.3.5.RELEASE'
-    testCompile 'javax.servlet:servlet-api:2.5'
+    testCompile rootProject.ext.dependencies["spring-web"]
+    testCompile rootProject.ext.dependencies["javax.servlet-api"]
 
     testCompile rootProject.ext.dependencies["spring-test"]
     testCompile rootProject.ext.dependencies["fastjson"]
@@ -19,5 +19,5 @@ dependencies {
     testCompile rootProject.ext.dependencies["oracle"]
     testCompile rootProject.ext.dependencies["mysql"]
     testCompile rootProject.ext.dependencies["jackson"]
-    testCompile 'ch.qos.logback:logback-classic:1.2.3'
+    testCompile rootProject.ext.dependencies["logback-classic"]
 }