Moved from JCenter to Maven Central.
This commit is contained in:
parent
462bfe3cc5
commit
817b2e0eeb
5 changed files with 30 additions and 87 deletions
92
build.gradle
92
build.gradle
|
@ -4,11 +4,11 @@ plugins {
|
||||||
id 'jacoco'
|
id 'jacoco'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'pmd'
|
id 'pmd'
|
||||||
id 'com.jfrog.bintray' version '1.8.5'
|
id 'signing'
|
||||||
id 'com.github.ben-manes.versions' version '0.28.0'
|
id 'com.github.ben-manes.versions' version '0.38.0'
|
||||||
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
|
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
|
||||||
id 'com.github.spotbugs' version '4.4.4'
|
id 'com.github.spotbugs' version '4.7.0'
|
||||||
id 'org.sonarqube' version '3.0'
|
id 'org.sonarqube' version '3.1.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
import com.github.spotbugs.snom.SpotBugsTask
|
import com.github.spotbugs.snom.SpotBugsTask
|
||||||
|
@ -26,30 +26,25 @@ final def mavenLicenseUrl = 'http://opensource.org/licenses/BSD-3-Clause'
|
||||||
final def mavenScmCon = 'https://github.com/ethauvin/semver.git'
|
final def mavenScmCon = 'https://github.com/ethauvin/semver.git'
|
||||||
final def mavenScmDevCon = 'git@github.com:ethauvin/semver.git'
|
final def mavenScmDevCon = 'git@github.com:ethauvin/semver.git'
|
||||||
|
|
||||||
final def pkgLicenses = ['BSD 3-Clause']
|
|
||||||
final def pkgIssueTrackerUrl = mavenUrl + '/issues'
|
|
||||||
final def pkgLabels = ['java', 'kotlin', 'annotation', 'processor', 'semantic', 'version']
|
|
||||||
|
|
||||||
ext.versions = [
|
ext.versions = [
|
||||||
spotbugs: '4.0.6'
|
spotbugs: '4.2.2'
|
||||||
]
|
]
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.spullara.mustache.java:compiler:0.9.6'
|
implementation 'com.github.spullara.mustache.java:compiler:0.9.7'
|
||||||
|
|
||||||
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.10.1'
|
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
|
||||||
spotbugsPlugins 'com.mebigfatguy.sb-contrib:sb-contrib:7.4.7'
|
spotbugsPlugins 'com.mebigfatguy.sb-contrib:sb-contrib:7.4.7'
|
||||||
|
|
||||||
compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
||||||
testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
||||||
|
|
||||||
testImplementation 'org.testng:testng:7.2.0'
|
testImplementation 'org.testng:testng:7.4.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +55,8 @@ tasks.withType(JavaCompile) {
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
withSourcesJar()
|
||||||
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
pmd {
|
pmd {
|
||||||
|
@ -69,60 +66,10 @@ pmd {
|
||||||
consoleOutput = true
|
consoleOutput = true
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
|
|
||||||
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
|
|
||||||
publications = ['MyPublication']
|
|
||||||
dryRun = false
|
|
||||||
pkg {
|
|
||||||
repo = 'maven'
|
|
||||||
name = mavenName
|
|
||||||
licenses = pkgLicenses
|
|
||||||
desc = mavenDescription
|
|
||||||
//released = new Date()
|
|
||||||
websiteUrl = mavenUrl
|
|
||||||
issueTrackerUrl = pkgIssueTrackerUrl
|
|
||||||
vcsUrl = mavenScmCon
|
|
||||||
labels = pkgLabels
|
|
||||||
publicDownloadNumbers = true
|
|
||||||
version {
|
|
||||||
gpg { sign = true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bintrayUpload {
|
|
||||||
versionName = "$project.version"
|
|
||||||
versionDesc = "$mavenName $project.version"
|
|
||||||
versionVcsTag = "$project.version"
|
|
||||||
versionReleased = new Date()
|
|
||||||
}
|
|
||||||
|
|
||||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
||||||
group = 'Build'
|
|
||||||
description = 'Builds an archive of the javadoc docs.'
|
|
||||||
archiveClassifier.set('javadoc')
|
|
||||||
from javadoc.destinationDir
|
|
||||||
}
|
|
||||||
|
|
||||||
task sourceJar(type: Jar) {
|
|
||||||
group = 'Build'
|
|
||||||
description = 'Builds an archive of the source code.'
|
|
||||||
archiveClassifier.set('sources')
|
|
||||||
from sourceSets.main.allSource
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives javadocJar
|
|
||||||
archives sourceJar
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
MyPublication(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
from components.java
|
from components.java
|
||||||
artifact sourceJar
|
|
||||||
artifact javadocJar
|
|
||||||
groupId project.group
|
groupId project.group
|
||||||
artifactId rootProject.name
|
artifactId rootProject.name
|
||||||
|
|
||||||
|
@ -134,7 +81,6 @@ publishing {
|
||||||
license {
|
license {
|
||||||
name = mavenLicense
|
name = mavenLicense
|
||||||
url = mavenLicenseUrl
|
url = mavenLicenseUrl
|
||||||
distribution = 'repo'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
developers {
|
developers {
|
||||||
|
@ -142,16 +88,29 @@ publishing {
|
||||||
id = 'ethauvin'
|
id = 'ethauvin'
|
||||||
name = 'Erik C. Thauvin'
|
name = 'Erik C. Thauvin'
|
||||||
email = 'erik@thauvin.net'
|
email = 'erik@thauvin.net'
|
||||||
|
url = 'https://erik.thauvin.net/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scm {
|
scm {
|
||||||
connection = "scm:git:" + mavenScmCon
|
connection = "scm:git:" + mavenScmCon
|
||||||
developerConnection = "scm:git:" + mavenScmDevCon
|
developerConnection = "scm:git:" + mavenScmDevCon
|
||||||
url = mavenScmCon
|
url = mavenUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "ossrh"
|
||||||
|
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
|
||||||
|
credentials(PasswordCredentials)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
useGpgCmd()
|
||||||
|
sign publishing.publications.mavenJava
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
|
@ -224,7 +183,6 @@ jacocoTestReport {
|
||||||
html.enabled = true
|
html.enabled = true
|
||||||
xml.enabled = true
|
xml.enabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sonarqube {
|
sonarqube {
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
21
gradlew.bat
vendored
21
gradlew.bat
vendored
|
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
@ -54,7 +54,7 @@ goto fail
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
@ -64,21 +64,6 @@ echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue