|
@@ -4,8 +4,8 @@ buildscript {
|
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
|
|
}
|
|
|
dependencies {
|
|
|
- classpath("io.spring.gradle:propdeps-plugin:0.0.9.RELEASE")
|
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.10")
|
|
|
+ classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -76,21 +76,16 @@ allprojects {
|
|
|
|
|
|
description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
|
|
|
|
|
|
-configure(subprojects) {
|
|
|
- apply plugin: 'propdeps'
|
|
|
- apply plugin: 'propdeps-maven'
|
|
|
- apply plugin: 'propdeps-idea'
|
|
|
- apply plugin: 'propdeps-eclipse'
|
|
|
-}
|
|
|
-
|
|
|
subprojects {
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
apply plugin: 'signing'
|
|
|
+ apply plugin: 'maven-publish'
|
|
|
+ apply plugin: 'nebula.optional-base'
|
|
|
+ apply plugin: 'nebula.provided-base'
|
|
|
sourceCompatibility = "${javaVersion}"
|
|
|
targetCompatibility = "${javaVersion}"
|
|
|
|
|
|
- //noinspection GroovyAssignabilityCheck
|
|
|
tasks.withType(JavaCompile) {
|
|
|
options.encoding = 'UTF-8'
|
|
|
}
|
|
@@ -143,81 +138,58 @@ subprojects {
|
|
|
}
|
|
|
|
|
|
tasks.whenTaskAdded { task ->
|
|
|
- if (task.name.contains('uploadArchives') || task.name.contains("signArchives")) {
|
|
|
+ if (task.name.contains('signMavenJavaPublication')) {
|
|
|
task.enabled = new File(project.property('signing.secretKeyRingFile') as String).isFile()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- signing {
|
|
|
- sign configurations.archives
|
|
|
- }
|
|
|
|
|
|
- install {
|
|
|
- repositories.mavenInstaller {
|
|
|
- pom.whenConfigured { generatedPom ->
|
|
|
- generatedPom.dependencies.removeAll { dep ->
|
|
|
- dep.scope == "test"
|
|
|
- }
|
|
|
- generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
|
|
|
- "$dep.scope:$dep.groupId:$dep.artifactId"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 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/") {
|
|
|
- //noinspection GroovyAssignabilityCheck
|
|
|
- authentication(userName: userName, password: passWord)
|
|
|
- }
|
|
|
+ publishing {
|
|
|
+ publications {
|
|
|
+ mavenJava(MavenPublication) {
|
|
|
+ from components.java
|
|
|
|
|
|
- snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
|
- //noinspection GroovyAssignabilityCheck
|
|
|
- authentication(userName: userName, password: passWord)
|
|
|
- }
|
|
|
+ artifact sourcesJar
|
|
|
+ artifact javadocJar
|
|
|
|
|
|
- pom.version = "$project.version"
|
|
|
- pom.artifactId = "$project.name"
|
|
|
- pom.groupId = "$project.group"
|
|
|
- pom.project {
|
|
|
- //noinspection GroovyAssignabilityCheck
|
|
|
- name 'mybatis-plus'
|
|
|
+ pom {
|
|
|
+ name = 'mybatis-plus'
|
|
|
packaging 'jar'
|
|
|
- description 'An enhanced toolkit of Mybatis to simplify development.'
|
|
|
- url 'https://github.com/baomidou/mybatis-plus'
|
|
|
-
|
|
|
+ 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'
|
|
|
+ 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 {
|
|
|
- //noinspection GroovyAssignabilityCheck
|
|
|
- name 'The Apache License, Version 2.0'
|
|
|
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
+ name = 'The Apache License, Version 2.0'
|
|
|
+ url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
}
|
|
|
}
|
|
|
|
|
|
developers {
|
|
|
developer {
|
|
|
- id 'baomidou'
|
|
|
- //noinspection GroovyAssignabilityCheck
|
|
|
- name 'hubin'
|
|
|
- email 'jobob@qq.com'
|
|
|
+ id = 'baomidou'
|
|
|
+ name = 'hubin'
|
|
|
+ email = 'jobob@qq.com'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ signing {
|
|
|
+ sign publishing.publications.mavenJava
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- compileJava.dependsOn(processResources)
|
|
|
}
|