Просмотр исходного кода

:package: 构建脚本转为用 Gradle-Kotlin-DSL 编写

gitee#IRLNE
Cat73 6 лет назад
Родитель
Сommit
9d8741857f

+ 0 - 226
build.gradle

@@ -1,226 +0,0 @@
-buildscript {
-    repositories {
-        maven { url "https://plugins.gradle.org/m2/" }
-    }
-    dependencies {
-        //noinspection DifferentKotlinGradleVersion
-        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.10'
-        classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
-    }
-}
-
-ext {
-    configuration = [
-        javaVersion = JavaVersion.VERSION_1_8
-    ]
-
-    libraries = [
-        mybatisSpringVersion = '2.0.0',
-        mybatisVersion = '3.5.0',
-        springVersion = '5.1.4.RELEASE',
-        jsqlparserVersion = '1.3',
-        junitVersion = '5.4.0-RC1', // TODO 5.4.0 预计将与 2019-02-06 发布,届时应替换成正式版本
-    ]
-
-    lib = [
-        "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}",
-        "spring-context-support": "org.springframework:spring-context-support:${springVersion}",
-        "spring-jdbc"           : "org.springframework:spring-jdbc:${springVersion}",
-        "spring-tx"             : "org.springframework:spring-tx:${springVersion}",
-        "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.3",
-        //test
-        "spring-test"           : "org.springframework:spring-test:${springVersion}",
-        "junit-jupiter-api"     : "org.junit.jupiter:junit-jupiter-api:${junitVersion}",
-        "junit-jupiter-engine"  : "org.junit.jupiter:junit-jupiter-engine:${junitVersion}",
-        "mockito-all"           : "org.mockito:mockito-all:1.10.19",
-        "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",
-        //datasource
-        "hikaricp"              : "com.zaxxer:HikariCP:2.7.0",
-        "druid"                 : "com.alibaba:druid:1.0.29",
-        "commons-dbcp2"         : "org.apache.commons:commons-dbcp2:2.1.1",
-        "sqlserver"             : "com.microsoft.sqlserver:sqljdbc4:4.0",
-        "postgresql"            : "org.postgresql:postgresql:9.4.1212",
-        "oracle"                : fileTree(dir: 'libs', includes: ['ojdbc-11.2.0.3-jdk16.jar']),
-        "h2"                    : "com.h2database:h2:1.4.194",
-        "mysql"                 : "mysql:mysql-connector-java:5.1.38",
-        //code generator
-        "velocity"              : "org.apache.velocity:velocity-engine-core:2.0",
-        "freemarker"            : "org.freemarker:freemarker:2.3.9",
-        "beetl"                 : "com.ibeetl:beetl:2.9.6",
-    ]
-}
-
-allprojects {
-    group = 'com.baomidou'
-    version = '3.0.8.3-SNAPSHOT'
-}
-
-description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
-
-subprojects {
-
-    apply plugin: 'java-library'
-    apply plugin: 'signing'
-    apply plugin: 'maven-publish'
-
-    sourceCompatibility = "${javaVersion}"
-    targetCompatibility = "${javaVersion}"
-
-    tasks.withType(JavaCompile) {
-        options.encoding = 'UTF-8'
-        options.deprecation = true
-        options.compilerArgs += ["-parameters"]
-    }
-
-    jar {
-        afterEvaluate {
-            manifest {
-                attributes 'Implementation-Version': version
-            }
-        }
-    }
-
-    repositories {
-        mavenLocal()
-        maven { url "http://maven.aliyun.com/nexus/contencommons-dbcpt/groups/public/" }
-        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
-        maven { url "http://www.cameliatk.jp/maven2/repository/thirdparty" }
-        jcenter()
-    }
-
-    dependencies {
-        annotationProcessor "${lib.lombok}"
-        implementation "${lib.lombok}"
-        testAnnotationProcessor "${lib.lombok}"
-        testCompileOnly "${lib.'mockito-all'}"
-        testCompile "${lib.'junit-jupiter-api'}"
-        testRuntime "${lib.'junit-jupiter-engine'}"
-        testCompile 'org.mockito:mockito-junit-jupiter:2.23.4'
-    }
-
-    task sourcesJar(type: Jar) {
-        archiveClassifier.set('sources')
-        from sourceSets.main.allJava
-    }
-
-    javadoc {
-        afterEvaluate {
-            configure(options) {
-                encoding "UTF-8"
-                charSet 'UTF-8'
-                author true
-                version true
-                failOnError false
-                links "http://docs.oracle.com/javase/8/docs/api"
-            }
-        }
-    }
-
-    task javadocJar(type: Jar) {
-        archiveClassifier.set('javadoc')
-        from javadoc
-    }
-
-    artifacts {
-        archives sourcesJar
-        archives javadocJar
-    }
-
-    tasks.whenTaskAdded { task ->
-        if (task.name.contains('signMavenJavaPublication')) {
-            task.enabled = new File(project.property('signing.secretKeyRingFile') as String).isFile()
-        }
-    }
-
-    publishing {
-
-        repositories {
-            maven {
-                def userName = System.getProperty("un")
-                def passWord = System.getProperty("ps")
-                def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
-                def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
-                url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
-
-                credentials {
-                    username userName
-                    password passWord
-                }
-            }
-        }
-        publications {
-
-            mavenJava(MavenPublication) {
-                from components.java
-
-                artifact sourcesJar
-                artifact javadocJar
-
-                pom {
-                    name = 'mybatis-plus'
-                    packaging 'jar'
-                    description = 'An enhanced toolkit of Mybatis to simplify development.'
-                    url = 'https://github.com/baomidou/mybatis-plus'
-
-                    scm {
-                        connection = 'scm:git@github.com:Codearte/gradle-nexus-staging-plugin.git'
-                        developerConnection = 'scm:git@github.com:Codearte/gradle-nexus-staging-plugin.git'
-                        url = 'https://github.com/baomidou/mybatis-plus'
-                    }
-
-                    licenses {
-                        license {
-                            name = 'The Apache License, Version 2.0'
-                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-                        }
-                    }
-
-                    developers {
-                        developer {
-                            id = 'baomidou'
-                            name = 'hubin'
-                            email = 'jobob@qq.com'
-                        }
-                    }
-
-                    withXml {
-                        def root = asNode()
-                        root.dependencies.'*'.findAll {
-                            def d = it
-                            d.scope.text() == 'runtime' && project.configurations.findByName("implementation").allDependencies.find { dep ->
-                                dep.name == it.artifactId.text()
-                            }.each() {
-                                if (d.artifactId.text() != 'lombok') {
-                                    d.scope*.value = 'compile'
-                                    d.appendNode('optional', true)
-                                } else {
-                                    d.scope*.value = 'provided'
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        signing {
-            sign publishing.publications.mavenJava
-        }
-    }
-}

+ 223 - 0
build.gradle.kts

@@ -0,0 +1,223 @@
+buildscript {
+    repositories {
+        maven("https://plugins.gradle.org/m2/")
+    }
+
+    dependencies {
+        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.10")
+        classpath("com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3")
+    }
+}
+
+plugins {
+    `java-library`
+    signing
+    `maven-publish`
+}
+
+// versions
+val javaVersion = JavaVersion.VERSION_1_8
+val mybatisSpringVersion = "2.0.0"
+val mybatisVersion = "3.5.0"
+val springVersion = "5.1.4.RELEASE"
+val jsqlparserVersion = "1.3"
+val junitVersion = "5.4.0-RC1" // TODO 5.4.0 预计将与 2019-02-06 发布,届时应替换成正式版本
+val lombokVersion = "1.18.4"
+val cglibVersion = "3.2.6"
+
+// libs
+val lib = mapOf(
+    "kotlin-reflect"             to "org.jetbrains.kotlin:kotlin-reflect:1.3.10",
+    "kotlin-stdlib-jdk8"         to "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.10",
+    "jsqlparser"                 to "com.github.jsqlparser:jsqlparser:$jsqlparserVersion",
+    "mybatis-spring"             to "org.mybatis:mybatis-spring:$mybatisSpringVersion",
+    "mybatis"                    to "org.mybatis:mybatis:$mybatisVersion",
+    "spring-context-support"     to "org.springframework:spring-context-support:$springVersion",
+    "spring-jdbc"                to "org.springframework:spring-jdbc:$springVersion",
+    "spring-tx"                  to "org.springframework:spring-tx:$springVersion",
+    "spring-web"                 to "org.springframework:spring-web:$springVersion",
+    "spring-aop"                 to "org.springframework:spring-aop:$springVersion",
+    "cglib"                      to "cglib:cglib:$cglibVersion",
+    "lombok"                     to "org.projectlombok:lombok:$lombokVersion",
+
+    "javax.servlet-api"          to "javax.servlet:javax.servlet-api:4.0.1",
+    "aspectjweaver"              to "org.aspectj:aspectjweaver:1.8.9",
+    "mockito"                    to "org.mockito:mockito-core:2.13.0",
+    "mybatis-ehcache"            to "org.mybatis.caches:mybatis-ehcache:1.1.0",
+    "slf4j-api"                  to "org.slf4j:slf4j-api:1.7.25",
+    "logback-classic"            to "ch.qos.logback:logback-classic:1.2.3",
+    // test
+    "spring-test"                to "org.springframework:spring-test:$springVersion",
+    "junit-jupiter-api"          to "org.junit.jupiter:junit-jupiter-api:$junitVersion",
+    "junit-jupiter-engine"       to "org.junit.jupiter:junit-jupiter-engine:$junitVersion",
+    "mockito-all"                to "org.mockito:mockito-all:1.10.19",
+    "fastjson"                   to "com.alibaba:fastjson:1.2.49",
+    "jackson"                    to "com.fasterxml.jackson.core:jackson-databind:2.9.6",
+    "tomcatjdbc"                 to "org.apache.tomcat:tomcat-jdbc:9.0.2",
+    // datasource
+    "hikaricp"                   to "com.zaxxer:HikariCP:2.7.0",
+    "druid"                      to "com.alibaba:druid:1.0.29",
+    "commons-dbcp2"              to "org.apache.commons:commons-dbcp2:2.1.1",
+    "sqlserver"                  to "com.microsoft.sqlserver:sqljdbc4:4.0",
+    "postgresql"                 to "org.postgresql:postgresql:9.4.1212",
+    "oracle"                     to fileTree("libs/ojdbc-11.2.0.3-jdk16.jar"),
+    "h2"                         to "com.h2database:h2:1.4.194",
+    "mysql"                      to "mysql:mysql-connector-java:5.1.38",
+    // code generator
+    "velocity"                   to "org.apache.velocity:velocity-engine-core:2.0",
+    "freemarker"                 to "org.freemarker:freemarker:2.3.9",
+    "beetl"                      to "com.ibeetl:beetl:2.9.6"
+)
+// ext
+extra["lib"] = lib
+
+allprojects {
+    group = "com.baomidou"
+    version = "3.0.8.3-SNAPSHOT"
+}
+
+description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
+
+subprojects {
+    // 插件
+    apply(plugin = "org.gradle.java-library")
+    apply(plugin = "org.gradle.maven-publish")
+    apply(plugin = "org.gradle.signing")
+
+    // Java 版本
+    configure<JavaPluginConvention> {
+        sourceCompatibility = javaVersion
+        targetCompatibility = javaVersion
+    }
+
+    // 编译器配置
+    tasks.withType<JavaCompile> {
+        options.encoding = "UTF-8"
+        options.isDeprecation = true
+        options.compilerArgs.add("-parameters")
+    }
+
+    tasks.withType<Jar> {
+        afterEvaluate {
+            manifest {
+                attributes["Implementation-Version"] = version
+            }
+        }
+    }
+
+    repositories {
+        mavenLocal()
+        maven("http://maven.aliyun.com/nexus/contencommons-dbcpt/groups/public/")
+        maven("https://oss.sonatype.org/content/repositories/snapshots/")
+        maven("http://www.cameliatk.jp/maven2/repository/thirdparty")
+        jcenter()
+    }
+
+    dependencies {
+        annotationProcessor("${lib["lombok"]}")
+        compileOnly("${lib["lombok"]}")
+
+        testAnnotationProcessor("${lib["lombok"]}")
+        testCompileOnly("${lib["mockito-all"]}")
+        testCompile("${lib["junit-jupiter-api"]}")
+        testRuntime("${lib["junit-jupiter-engine"]}")
+        testCompile("org.mockito:mockito-junit-jupiter:2.23.4")
+    }
+
+    val sourcesJar by tasks.registering(Jar::class) {
+        dependsOn(JavaPlugin.CLASSES_TASK_NAME)
+        archiveClassifier.set("source")
+        from(sourceSets["main"].allJava)
+    }
+
+    tasks.withType<Javadoc> {
+        options.encoding = "UTF-8"
+        isFailOnError = false
+        (options as? StandardJavadocDocletOptions)?.also {
+            it.charSet = "UTF-8"
+            it.isAuthor = true
+            it.isVersion = true
+            it.links = listOf("https://docs.oracle.com/javase/8/docs/api")
+            if (JavaVersion.current().isJava9Compatible) {
+                it.addBooleanOption("html5", true)
+            }
+        }
+    }
+
+    val javadocJar by tasks.registering(Jar::class) {
+        dependsOn(JavaPlugin.JAVADOC_TASK_NAME)
+        archiveClassifier.set("javadoc")
+        from(tasks["javadoc"])
+    }
+
+    tasks.whenTaskAdded {
+        if (this.name.contains("signMavenJavaPublication")) {
+            this.enabled = File(project.property("signing.secretKeyRingFile") as String).isFile
+        }
+    }
+
+    publishing {
+        repositories {
+            maven {
+                val userName = System.getProperty("un")
+                val passWord = System.getProperty("ps")
+                val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
+                val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
+                setUrl(if (version.toString().endsWith("RELEASE")) releasesRepoUrl else snapshotsRepoUrl)
+
+                credentials {
+                    username = userName
+                    password = passWord
+                }
+            }
+        }
+        publications {
+            register("mavenJava", MavenPublication::class) {
+                pom {
+                    name.set("mybatis-plus")
+                    description.set("An enhanced toolkit of Mybatis to simplify development.")
+                    inceptionYear.set("2016")
+                    url.set("https://github.com/baomidou/mybatis-plus")
+
+                    artifactId = project.name
+                    groupId = "${project.group}"
+                    version = "${project.version}"
+                    packaging = "jar"
+
+                    organization {
+                        name.set("baomidou")
+                    }
+
+                    scm {
+                        connection.set("scm:git@github.com:Codearte/gradle-nexus-staging-plugin.git")
+                        developerConnection.set("scm:git@github.com:Codearte/gradle-nexus-staging-plugin.git")
+                        url.set("https://github.com/baomidou/mybatis-plus")
+                    }
+
+                    licenses {
+                        license {
+                            name.set("The Apache License, Version 2.0")
+                            url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
+                        }
+                    }
+
+                    developers {
+                        developer {
+                            id.set("baomidou")
+                            name.set("hubin")
+                            email.set("jobob@qq.com")
+                        }
+                    }
+                }
+
+                from(components["java"])
+                artifact(sourcesJar.get())
+                artifact(javadocJar.get())
+            }
+        }
+    }
+
+    signing {
+        sign(publishing.publications.getByName("mavenJava"))
+    }
+}

+ 0 - 0
mybatis-plus-annotation/build.gradle → mybatis-plus-annotation/build.gradle.kts


+ 0 - 15
mybatis-plus-boot-starter/build.gradle

@@ -1,15 +0,0 @@
-ext{
-    springBootVersion = "2.1.2.RELEASE"
-}
-dependencies {
-    api project(":mybatis-plus")
-    implementation(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}" as String))
-    annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"
-    annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor:${springBootVersion}"
-    api 'org.springframework.boot:spring-boot-autoconfigure'
-    api 'org.springframework.boot:spring-boot-starter-jdbc'
-    implementation 'org.springframework.boot:spring-boot-configuration-processor'
-    implementation 'org.springframework.boot:spring-boot-autoconfigure-processor'
-}
-
-compileJava.dependsOn(processResources)

+ 16 - 0
mybatis-plus-boot-starter/build.gradle.kts

@@ -0,0 +1,16 @@
+val springBootVersion = "2.1.2.RELEASE"
+
+dependencies {
+    api(project(":mybatis-plus"))
+    implementation(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:$springBootVersion"))
+    annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:$springBootVersion")
+    annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor:$springBootVersion")
+    api("org.springframework.boot:spring-boot-autoconfigure")
+    api("org.springframework.boot:spring-boot-starter-jdbc")
+    implementation("org.springframework.boot:spring-boot-configuration-processor")
+    implementation("org.springframework.boot:spring-boot-autoconfigure-processor")
+}
+
+tasks.withType<JavaCompile> {
+    dependsOn(tasks.withType(ProcessResources::class))
+}

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

@@ -1,20 +0,0 @@
-dependencies {
-    api project(":mybatis-plus-annotation")
-    api "${lib.mybatis}"
-    api "${lib.jsqlparser}"
-
-
-    implementation "${lib.cglib}"
-    implementation "${lib.'spring-aop'}"
-
-    testCompile "${lib.'mybatis-ehcache'}"
-    testCompile "${lib.'logback-classic'}"
-    testCompile("${lib.'commons-dbcp2'}") {
-        exclude module: "commons-logging"
-    }
-    testCompile "${lib.aspectjweaver}"
-    testCompile "${lib.hikaricp}"
-    testCompile "${lib.druid}"
-    testCompile "${lib.fastjson}"
-    testCompile "${lib.tomcatjdbc}"
-}

+ 21 - 0
mybatis-plus-core/build.gradle.kts

@@ -0,0 +1,21 @@
+dependencies {
+    val lib: Map<String, Any> by rootProject.extra
+
+    api(project(":mybatis-plus-annotation"))
+    api("${lib["mybatis"]}")
+    api("${lib["jsqlparser"]}")
+
+    implementation("${lib["cglib"]}")
+    implementation("${lib["spring-aop"]}")
+
+    testCompile("${lib["mybatis-ehcache"]}")
+    testCompile("${lib["logback-classic"]}")
+    testCompile("${lib["commons-dbcp2"]}") {
+        exclude(module = "commons-logging")
+    }
+    testCompile("${lib["aspectjweaver"]}")
+    testCompile("${lib["hikaricp"]}")
+    testCompile("${lib["druid"]}")
+    testCompile("${lib["fastjson"]}")
+    testCompile("${lib["tomcatjdbc"]}")
+}

+ 0 - 29
mybatis-plus-extension/build.gradle

@@ -1,29 +0,0 @@
-apply plugin: 'org.jetbrains.kotlin.jvm'
-dependencies {
-    api project(":mybatis-plus-core")
-    api "${lib.'mybatis-spring'}"
-    api "${lib.mybatis}"
-
-    implementation "${lib.'kotlin-stdlib-jdk8'}"
-    implementation "${lib.'kotlin-reflect'}"
-    implementation "${lib.'spring-context-support'}"
-    implementation "${lib.'spring-jdbc'}"
-    implementation "${lib.'slf4j-api'}"
-
-    testCompile "${lib.'spring-web'}"
-    testCompile "${lib.'javax.servlet-api'}"
-    testCompile "${lib.'spring-test'}"
-    testCompile "${lib.fastjson}"
-
-    testCompile "${lib.hikaricp}"
-    testCompile "${lib.'commons-dbcp2'}"
-    testCompile "${lib.druid}"
-    testCompile "${lib.tomcatjdbc}"
-
-    testCompile "${lib.h2}"
-    testCompile "${lib.sqlserver}"
-    testCompile "${lib.postgresql}"
-    testCompile lib.oracle as ConfigurableFileTree
-    testCompile "${lib.mysql}"
-    testCompile "${lib.'logback-classic'}"
-}

+ 32 - 0
mybatis-plus-extension/build.gradle.kts

@@ -0,0 +1,32 @@
+apply(plugin = "org.jetbrains.kotlin.jvm")
+
+dependencies {
+    val lib: Map<String, Any> by rootProject.extra
+
+    api(project(":mybatis-plus-core"))
+    api("${lib["mybatis-spring"]}")
+    api("${lib["mybatis"]}")
+
+    implementation("${lib["kotlin-stdlib-jdk8"]}")
+    implementation("${lib["kotlin-reflect"]}")
+    implementation("${lib["spring-context-support"]}")
+    implementation("${lib["spring-jdbc"]}")
+    implementation("${lib["slf4j-api"]}")
+
+    testCompile("${lib["spring-web"]}")
+    testCompile("${lib["javax.servlet-api"]}")
+    testCompile("${lib["spring-test"]}")
+    testCompile("${lib["fastjson"]}")
+
+    testCompile("${lib["hikaricp"]}")
+    testCompile("${lib["commons-dbcp2"]}")
+    testCompile("${lib["druid"]}")
+    testCompile("${lib["tomcatjdbc"]}")
+
+    testCompile("${lib["h2"]}")
+    testCompile("${lib["sqlserver"]}")
+    testCompile("${lib["postgresql"]}")
+    testCompile(lib["oracle"] as ConfigurableFileTree)
+    testCompile("${lib["mysql"]}")
+    testCompile("${lib["logback-classic"]}")
+}

+ 0 - 14
mybatis-plus-generator/build.gradle

@@ -1,14 +0,0 @@
-dependencies {
-    api project(":mybatis-plus-extension")
-
-    implementation "${lib.velocity}"
-    implementation "${lib.freemarker}"
-    implementation "${lib.beetl}"
-
-    testCompile "${lib.sqlserver}"
-    testCompile "${lib.postgresql}"
-    testCompile lib.oracle as ConfigurableFileTree
-    testCompile "${lib.h2}"
-    testCompile "${lib.mysql}"
-    testCompile "${lib.'logback-classic'}"
-}

+ 16 - 0
mybatis-plus-generator/build.gradle.kts

@@ -0,0 +1,16 @@
+dependencies {
+    val lib: Map<String, Any> by rootProject.extra
+
+    api(project(":mybatis-plus-extension"))
+
+    implementation("${lib["velocity"]}")
+    implementation("${lib["freemarker"]}")
+    implementation("${lib["beetl"]}")
+
+    testCompile("${lib["sqlserver"]}")
+    testCompile("${lib["postgresql"]}")
+    testCompile(lib["oracle"] as ConfigurableFileTree)
+    testCompile("${lib["h2"]}")
+    testCompile("${lib["mysql"]}")
+    testCompile("${lib["logback-classic"]}")
+}

+ 0 - 26
mybatis-plus/build.gradle

@@ -1,26 +0,0 @@
-dependencies {
-    api project(":mybatis-plus-extension")
-    implementation project(":mybatis-plus-generator")
-
-    testCompile "${lib.'spring-web'}"
-    testCompile "${lib.'javax.servlet-api'}"
-
-    testCompile "${lib.'spring-test'}"
-    testCompile "${lib.fastjson}"
-
-    testCompile "${lib.hikaricp}"
-    testCompile "${lib.'commons-dbcp2'}"
-    testCompile "${lib.druid}"
-    testCompile "${lib.tomcatjdbc}"
-
-    testCompile "${lib.h2}"
-    testCompile "${lib.sqlserver}"
-    testCompile "${lib.postgresql}"
-    testCompile lib.oracle as ConfigurableFileTree
-    testCompile "${lib.mysql}"
-    testCompile "${lib.jackson}"
-    testCompile "${lib.'logback-classic'}"
-
-    testCompile "${lib.'spring-context-support'}"
-    testCompile "${lib.'spring-jdbc'}"
-}

+ 28 - 0
mybatis-plus/build.gradle.kts

@@ -0,0 +1,28 @@
+dependencies {
+    val lib: Map<String, Any> by rootProject.extra
+
+    api(project(":mybatis-plus-extension"))
+    implementation(project(":mybatis-plus-generator"))
+
+    testCompile("${lib["spring-web"]}")
+    testCompile("${lib["javax.servlet-api"]}")
+
+    testCompile("${lib["spring-test"]}")
+    testCompile("${lib["fastjson"]}")
+
+    testCompile("${lib["hikaricp"]}")
+    testCompile("${lib["commons-dbcp2"]}")
+    testCompile("${lib["druid"]}")
+    testCompile("${lib["tomcatjdbc"]}")
+
+    testCompile("${lib["h2"]}")
+    testCompile("${lib["sqlserver"]}")
+    testCompile("${lib["postgresql"]}")
+    testCompile(lib["oracle"] as ConfigurableFileTree)
+    testCompile("${lib["mysql"]}")
+    testCompile("${lib["jackson"]}")
+    testCompile("${lib["logback-classic"]}")
+
+    testCompile("${lib["spring-context-support"]}")
+    testCompile("${lib["spring-jdbc"]}")
+}

+ 0 - 8
settings.gradle

@@ -1,8 +0,0 @@
-rootProject.name = 'mybatis-plus-root'
-include 'mybatis-plus'
-include 'mybatis-plus-core'
-include 'mybatis-plus-annotation'
-include 'mybatis-plus-extension'
-include 'mybatis-plus-generator'
-include 'mybatis-plus-boot-starter'
-

+ 8 - 0
settings.gradle.kts

@@ -0,0 +1,8 @@
+rootProject.name = "mybatis-plus-root"
+
+include(":mybatis-plus")
+include(":mybatis-plus-core")
+include(":mybatis-plus-annotation")
+include(":mybatis-plus-extension")
+include(":mybatis-plus-generator")
+include(":mybatis-plus-boot-starter")