|
@@ -1,7 +1,3 @@
|
|
|
-apply plugin: 'java'
|
|
|
-apply plugin: 'maven'
|
|
|
-apply plugin: 'signing'
|
|
|
-
|
|
|
ext {
|
|
|
configuration = [
|
|
|
javaVersion = JavaVersion.VERSION_1_7
|
|
@@ -12,138 +8,141 @@ ext {
|
|
|
mybatisVersion = '3.4.5',
|
|
|
springVersion = '4.3.5.RELEASE',
|
|
|
]
|
|
|
+
|
|
|
+ dependencies = [
|
|
|
+ "jsqlparser": "com.github.jsqlparser:jsqlparser:1.1",
|
|
|
+ "mybatis-spring": "org.mybatis:mybatis-spring:${mybatisSpringVersion}",
|
|
|
+ "mybatis": "org.mybatis:mybatis:${mybatisVersion}",
|
|
|
+ "velocity":"org.apache.velocity:velocity-engine-core:2.0",
|
|
|
+ "slf4j-api":"org.slf4j:slf4j-api:1.7.25",
|
|
|
+ "junit":"junit:junit:4.12",
|
|
|
+ "commons-pool2":"org.apache.commons:commons-pool2:2.4.2",
|
|
|
+ "commons-dbcp2":"org.apache.commons:commons-dbcp2:2.1.1",
|
|
|
+ "mybatis-ehcache":"org.mybatis.caches:mybatis-ehcache:1.1.0",
|
|
|
+ "logback-classic":"ch.qos.logback:logback-classic:1.2.2",
|
|
|
+ "sqlserver":"com.microsoft.sqlserver:sqljdbc4:4.0",
|
|
|
+ "postgresql":"org.postgresql:postgresql:9.4.1212",
|
|
|
+ "oracle":"com.oracle:ojdbc14:10.2.0.5.0",
|
|
|
+ "h2":"com.h2database:h2:1.4.194",
|
|
|
+ "mysql":"mysql:mysql-connector-java:5.1.38",
|
|
|
+ "aspectjweaver":"org.aspectj:aspectjweaver:1.8.9",
|
|
|
+ "servlet-api":"javax.servlet:servlet-api:2.5",
|
|
|
+ "lombok":"org.projectlombok:lombok:1.16.16",
|
|
|
+ "hikaricp":"com.zaxxer:HikariCP:2.7.0",
|
|
|
+ "spring-test":"org.springframework:spring-test:${springVersion}",
|
|
|
+ "spring-webmvc":"org.springframework:spring-webmvc:${springVersion}",
|
|
|
+ "spring-context-support":"org.springframework:spring-context-support:${springVersion}",
|
|
|
+ "spring-jdbc":"org.springframework:spring-jdbc:${springVersion}",
|
|
|
+ "spring-tx":"org.springframework:spring-tx:${springVersion}",
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+allprojects{
|
|
|
+ group = 'com.baomidou'
|
|
|
+ version = '2.1.5'
|
|
|
}
|
|
|
|
|
|
-group = 'com.baomidou'
|
|
|
-version = '2.1.5'
|
|
|
|
|
|
description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
|
|
|
|
|
|
-sourceCompatibility = "${javaVersion}"
|
|
|
-targetCompatibility = "${javaVersion}"
|
|
|
|
|
|
-tasks.withType(JavaCompile) {
|
|
|
- options.encoding = 'UTF-8'
|
|
|
-}
|
|
|
+subprojects{
|
|
|
|
|
|
-repositories {
|
|
|
- mavenLocal()
|
|
|
- maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
|
|
- jcenter()
|
|
|
-}
|
|
|
+ apply plugin: 'java'
|
|
|
+ apply plugin: 'maven'
|
|
|
+ apply plugin: 'signing'
|
|
|
|
|
|
-def common = [
|
|
|
- "org.springframework:spring-tx:${springVersion}",
|
|
|
- "org.springframework:spring-jdbc:${springVersion}",
|
|
|
- "org.springframework:spring-context-support:${springVersion}",
|
|
|
- "com.zaxxer:HikariCP:2.7.0",
|
|
|
- "org.apache.velocity:velocity-engine-core:2.0"
|
|
|
-]
|
|
|
-
|
|
|
-dependencies {
|
|
|
- compile("org.mybatis:mybatis-spring:${mybatisSpringVersion}")
|
|
|
- compile("org.mybatis:mybatis:${mybatisVersion}")
|
|
|
- compile("com.github.jsqlparser:jsqlparser:1.1")
|
|
|
- compileOnly common
|
|
|
- testCompileOnly("javax.servlet:servlet-api:2.5")
|
|
|
- testCompile("org.mybatis.caches:mybatis-ehcache:1.1.0")
|
|
|
- testCompile("ch.qos.logback:logback-classic:1.2.2")
|
|
|
- testCompile("junit:junit:4.12")
|
|
|
- testCompile("org.apache.commons:commons-dbcp2:2.1.1") {
|
|
|
- exclude(module: 'commons-logging')
|
|
|
+ sourceCompatibility = "${javaVersion}"
|
|
|
+ targetCompatibility = "${javaVersion}"
|
|
|
+
|
|
|
+ tasks.withType(JavaCompile) {
|
|
|
+ options.encoding = 'UTF-8'
|
|
|
}
|
|
|
- testCompile("org.apache.commons:commons-pool2:2.4.2")
|
|
|
- testCompile("com.microsoft.sqlserver:sqljdbc4:4.0")
|
|
|
- testCompile("org.postgresql:postgresql:9.4.1212")
|
|
|
- testCompile("com.oracle:ojdbc14:10.2.0.5.0")
|
|
|
- testCompile("com.h2database:h2:1.4.194")
|
|
|
- testCompile("mysql:mysql-connector-java:5.1.38")
|
|
|
- testCompile common
|
|
|
- testCompile("org.slf4j:slf4j-api:1.7.25")
|
|
|
- testCompile("org.slf4j:jcl-over-slf4j:1.7.25")
|
|
|
- testCompile("org.springframework:spring-test:${springVersion}")
|
|
|
- testCompile("org.springframework:spring-webmvc:${springVersion}")
|
|
|
- testCompile("org.aspectj:aspectjweaver:1.8.9")
|
|
|
- testCompile("javax.servlet:servlet-api:2.5")
|
|
|
- testCompile("org.projectlombok:lombok:1.16.16")
|
|
|
-}
|
|
|
|
|
|
-task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
- classifier = 'sources'
|
|
|
- from sourceSets.main.allSource
|
|
|
-}
|
|
|
+ repositories {
|
|
|
+ mavenLocal()
|
|
|
+ maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
|
|
+ jcenter()
|
|
|
+ }
|
|
|
|
|
|
-javadoc {
|
|
|
- options {
|
|
|
- encoding "UTF-8"
|
|
|
- charSet 'UTF-8'
|
|
|
- author true
|
|
|
- version true
|
|
|
- failOnError false
|
|
|
- links "http://docs.oracle.com/javase/7/docs/api"
|
|
|
+ task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
+ classifier = 'sources'
|
|
|
+ from sourceSets.main.allSource
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
|
- classifier = 'javadoc'
|
|
|
- from 'build/docs/javadoc'
|
|
|
-}
|
|
|
+ javadoc {
|
|
|
+ options {
|
|
|
+ encoding "UTF-8"
|
|
|
+ charSet 'UTF-8'
|
|
|
+ author true
|
|
|
+ version true
|
|
|
+ failOnError false
|
|
|
+ links "http://docs.oracle.com/javase/7/docs/api"
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-artifacts {
|
|
|
- archives sourcesJar
|
|
|
- archives javadocJar
|
|
|
-}
|
|
|
+ task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
|
+ classifier = 'javadoc'
|
|
|
+ from 'build/docs/javadoc'
|
|
|
+ }
|
|
|
|
|
|
-signing {
|
|
|
- sign configurations.archives
|
|
|
-}
|
|
|
+ artifacts {
|
|
|
+ archives sourcesJar
|
|
|
+ archives javadocJar
|
|
|
+ }
|
|
|
|
|
|
-// gradle clean build uploadArchives -Dun=用户名 -Dps=密码 -x test
|
|
|
-uploadArchives {
|
|
|
- repositories {
|
|
|
- mavenDeployer {
|
|
|
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
+ signing {
|
|
|
+ sign configurations.archives
|
|
|
+ }
|
|
|
|
|
|
- def userName = System.getProperty("un")
|
|
|
- def passWord = System.getProperty("ps")
|
|
|
- repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
|
- authentication(userName: userName, password: passWord)
|
|
|
- }
|
|
|
+// gradle clean build uploadArchives -Dun=用户名 -Dps=密码 -x test
|
|
|
+ uploadArchives {
|
|
|
+ repositories {
|
|
|
+ mavenDeployer {
|
|
|
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
+
|
|
|
+ def userName = System.getProperty("un")
|
|
|
+ def passWord = System.getProperty("ps")
|
|
|
+ repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
|
+ authentication(userName: userName, password: passWord)
|
|
|
+ }
|
|
|
|
|
|
- snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
|
- authentication(userName: userName, password: passWord)
|
|
|
- }
|
|
|
+ snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
|
+ authentication(userName: userName, password: passWord)
|
|
|
+ }
|
|
|
|
|
|
- pom.version = "$project.version"
|
|
|
- pom.artifactId = "$project.name"
|
|
|
- pom.groupId = "$project.group"
|
|
|
- pom.project {
|
|
|
- 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'
|
|
|
+ pom.version = "$project.version"
|
|
|
+ pom.artifactId = "$project.name"
|
|
|
+ pom.groupId = "$project.group"
|
|
|
+ pom.project {
|
|
|
+ name 'mybatis-plus'
|
|
|
+ packaging 'jar'
|
|
|
+ description 'An enhanced toolkit of Mybatis to simplify development.'
|
|
|
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'
|
|
|
+ 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'
|
|
|
+ developers {
|
|
|
+ developer {
|
|
|
+ id 'baomidou'
|
|
|
+ name 'hubin'
|
|
|
+ email 'jobob@qq.com'
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|