update to bouncy castler 1.60 to fix signing problem with JDK 10, update Gradle, update lots of helper versions
This commit is contained in:
parent
8550f486b4
commit
3f21e9eff3
10 changed files with 102 additions and 89 deletions
100
build.gradle
100
build.gradle
|
@ -1,34 +1,60 @@
|
||||||
|
import java.time.ZonedDateTime
|
||||||
|
import java.time.format.DateTimeFormatter
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "org.sonarqube" version "2.5"
|
id "org.sonarqube" version "2.6.2"
|
||||||
id "io.codearte.nexus-staging" version "0.7.0"
|
id "io.codearte.nexus-staging" version "0.11.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
printf "Date: %s\nHost: %s\nOS: %s %s %s\nJava: %s %s %s %s\nGradle: %s Groovy: %s Java: %s\n" +
|
||||||
|
"Build: group: ${project.group} name: ${project.name} version: ${project.version}\n",
|
||||||
|
ZonedDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME),
|
||||||
|
InetAddress.getLocalHost(),
|
||||||
|
System.getProperty("os.name"),
|
||||||
|
System.getProperty("os.arch"),
|
||||||
|
System.getProperty("os.version"),
|
||||||
|
System.getProperty("java.version"),
|
||||||
|
System.getProperty("java.vm.version"),
|
||||||
|
System.getProperty("java.vm.vendor"),
|
||||||
|
System.getProperty("java.vm.name"),
|
||||||
|
gradle.gradleVersion, GroovySystem.getVersion(), JavaVersion.current()
|
||||||
|
|
||||||
|
// our RPM gradle plugin integration test looks into Gradle's " Task : " output
|
||||||
|
if (VersionNumber.parse(gradle.gradleVersion).compareTo(VersionNumber.parse("4.8")) < 0) {
|
||||||
|
throw new GradleScriptException("Gradle version must be 4.8 or higher", null)
|
||||||
|
}
|
||||||
|
|
||||||
|
ext {
|
||||||
|
user = 'xbib'
|
||||||
|
projectName = 'rpm'
|
||||||
|
projectDescription = 'Java 8 RPM implementation with plugins for Ant, Maven, Gradle'
|
||||||
|
scmUrl = 'https://github.com/xbib/rpm'
|
||||||
|
scmConnection = 'scm:git:git://github.com/xbib/rpm.git'
|
||||||
|
scmDeveloperConnection = 'scm:git:git://github.com/xbib/rpm.git'
|
||||||
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
apply plugin: 'signing'
|
|
||||||
apply plugin: 'findbugs'
|
|
||||||
apply plugin: 'pmd'
|
|
||||||
apply plugin: 'checkstyle'
|
|
||||||
apply plugin: "jacoco"
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
wagon
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile 'junit:junit:4.12'
|
testCompile "junit:junit:${project.property('junit.version')}"
|
||||||
wagon 'org.apache.maven.wagon:wagon-ssh:2.12'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
compileJava {
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
compileTestJava {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
|
|
||||||
|
@ -47,62 +73,28 @@ allprojects {
|
||||||
delete 'out'
|
delete 'out'
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(FindBugs) {
|
|
||||||
ignoreFailures = true
|
|
||||||
reports {
|
|
||||||
xml.enabled = false
|
|
||||||
html.enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tasks.withType(Pmd) {
|
|
||||||
ignoreFailures = true
|
|
||||||
reports {
|
|
||||||
xml.enabled = true
|
|
||||||
html.enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tasks.withType(Checkstyle) {
|
|
||||||
ignoreFailures = true
|
|
||||||
reports {
|
|
||||||
xml.enabled = true
|
|
||||||
html.enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jacocoTestReport {
|
|
||||||
reports {
|
|
||||||
xml.enabled = true
|
|
||||||
csv.enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sonarqube {
|
sonarqube {
|
||||||
properties {
|
properties {
|
||||||
property "sonar.projectName", "xbib RPM"
|
property "sonar.projectName", "xbib RPM"
|
||||||
property "sonar.sourceEncoding", "UTF-8"
|
property "sonar.sourceEncoding", "UTF-8"
|
||||||
property "sonar.tests", "src/test/java"
|
property "sonar.tests", "src/test/java"
|
||||||
property "sonar.scm.provider", "git"
|
property "sonar.scm.provider", "git"
|
||||||
property "sonar.java.coveragePlugin", "jacoco"
|
|
||||||
property "sonar.junit.reportsPath", "build/test-results/test/"
|
property "sonar.junit.reportsPath", "build/test-results/test/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar) {
|
||||||
classifier 'sources'
|
classifier 'sources'
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
}
|
}
|
||||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
||||||
|
task javadocJar(type: Jar) {
|
||||||
classifier 'javadoc'
|
classifier 'javadoc'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar, javadocJar
|
archives sourcesJar, javadocJar
|
||||||
}
|
}
|
||||||
if (project.hasProperty('signing.keyId')) {
|
|
||||||
signing {
|
|
||||||
sign configurations.archives
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "${rootProject.projectDir}/gradle/ext.gradle"
|
|
||||||
apply from: "${rootProject.projectDir}/gradle/publish.gradle"
|
apply from: "${rootProject.projectDir}/gradle/publish.gradle"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'java-gradle-plugin'
|
id 'java-gradle-plugin'
|
||||||
id 'com.gradle.plugin-publish' version '0.9.7'
|
id 'com.gradle.plugin-publish' version '0.10.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group = 'org.xbib.gradle.plugin'
|
||||||
|
|
||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
|
@ -35,8 +37,8 @@ test {
|
||||||
|
|
||||||
if (project.hasProperty('gradle.publish.key')) {
|
if (project.hasProperty('gradle.publish.key')) {
|
||||||
pluginBundle {
|
pluginBundle {
|
||||||
website = 'https://github.com/xbib/gradle-plugin-rpm'
|
website = 'https://github.com/xbib/rpm'
|
||||||
vcsUrl = 'https://github.com/xbib/gradle-plugin-rpm'
|
vcsUrl = 'https://github.com/xbib/rpm'
|
||||||
plugins {
|
plugins {
|
||||||
rpmPlugin {
|
rpmPlugin {
|
||||||
id = 'org.xbib.gradle.plugin.rpm'
|
id = 'org.xbib.gradle.plugin.rpm'
|
||||||
|
@ -47,4 +49,4 @@ if (project.hasProperty('gradle.publish.key')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ class BuildLauncherBackedGradleHandle implements GradleHandle {
|
||||||
|
|
||||||
final private List<String> tasksExecuted
|
final private List<String> tasksExecuted
|
||||||
|
|
||||||
public static final String PROGRESS_TASK_PREFIX = "Execute :"
|
public static final String PROGRESS_TASK_PREFIX = "Task :"
|
||||||
|
|
||||||
private GradleHandleBuildListener buildListener
|
private GradleHandleBuildListener buildListener
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ class BuildLauncherBackedGradleHandle implements GradleHandle {
|
||||||
@Override
|
@Override
|
||||||
void statusChanged(ProgressEvent event) {
|
void statusChanged(ProgressEvent event) {
|
||||||
// These are free form strings, :-(
|
// These are free form strings, :-(
|
||||||
if (event.getDescription().startsWith(PROGRESS_TASK_PREFIX)) { // E.g. "Execute :echo"
|
if (event.description.startsWith(PROGRESS_TASK_PREFIX)) { // E.g. "Task :echo"
|
||||||
String taskName = event.getDescription().substring(PROGRESS_TASK_PREFIX.length() - 1)
|
String taskName = event.description.substring(PROGRESS_TASK_PREFIX.length() - 1)
|
||||||
tasksExecuted.add(taskName)
|
tasksExecuted.add(taskName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ class BuildLauncherBackedGradleHandle implements GradleHandle {
|
||||||
buildListener?.buildFinished()
|
buildListener?.buildFinished()
|
||||||
}
|
}
|
||||||
String stdout = getStandardOutput()
|
String stdout = getStandardOutput()
|
||||||
List<MinimalExecutedTask> tasks = new ArrayList<MinimalExecutedTask>()
|
List<MinimalExecutedTask> tasks = new ArrayList<>()
|
||||||
for (String taskName: tasksExecuted) {
|
for (String taskName: tasksExecuted) {
|
||||||
boolean upToDate = isTaskUpToDate(stdout, taskName)
|
boolean upToDate = isTaskUpToDate(stdout, taskName)
|
||||||
boolean skipped = isTaskSkipped(stdout, taskName)
|
boolean skipped = isTaskSkipped(stdout, taskName)
|
||||||
|
|
|
@ -21,6 +21,6 @@ task buildRpm(type: Rpm) {
|
||||||
def result = runTasksSuccessfully('buildRpm')
|
def result = runTasksSuccessfully('buildRpm')
|
||||||
|
|
||||||
then:
|
then:
|
||||||
result.wasUpToDate(':buildRpm')
|
result.wasUpToDate('buildRpm')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
group = org.xbib
|
group = org.xbib
|
||||||
name = rpm
|
name = rpm
|
||||||
version = 1.0.1
|
version = 1.0.2
|
||||||
|
|
||||||
bouncycastle.version = 1.57
|
bouncycastle.version = 1.60
|
||||||
xbib-archive.version = 0.0.1
|
xbib-archive.version = 0.0.1
|
||||||
ant.version = 1.10.1
|
ant.version = 1.10.5
|
||||||
log4j.version = 2.8.2
|
log4j.version = 2.11.1
|
||||||
junit.version = 4.12
|
# must match groovy version in gradle
|
||||||
wagon.version = 2.12
|
groovy.version = 2.4.12
|
||||||
groovy.version = 2.4.11
|
|
||||||
spock-core.version = 1.1-groovy-2.4
|
spock-core.version = 1.1-groovy-2.4
|
||||||
xbib-guice.version = 4.0.4
|
xbib-guice.version = 4.0.4
|
||||||
maven.version = 3.5.0
|
maven.version = 3.5.0
|
||||||
mvel.version = 2.3.2.Final
|
maven-plugin-annotations.version = 3.5
|
||||||
|
maven-plugin-plugin.version = 3.5
|
||||||
|
mvel.version = 2.4.0.Final
|
||||||
|
|
||||||
|
junit.version = 4.12
|
||||||
|
wagon.version = 3.0.0
|
||||||
|
|
||||||
|
org.gradle.warning.mode=all
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
ext {
|
|
||||||
user = 'xbib'
|
|
||||||
projectName = 'rpm'
|
|
||||||
projectDescription = 'Java 8 RPM implementation with plugins for Ant, Maven, Gradle'
|
|
||||||
scmUrl = 'https://github.com/xbib/rpm'
|
|
||||||
scmConnection = 'scm:git:git://github.com/xbib/rpm.git'
|
|
||||||
scmDeveloperConnection = 'scm:git:git://github.com/xbib/rpm.git'
|
|
||||||
}
|
|
|
@ -1,5 +1,22 @@
|
||||||
|
|
||||||
|
apply plugin: 'signing'
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
wagon
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
wagon "org.apache.maven.wagon:wagon-ssh:${project.property('wagon.version')}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (project.hasProperty('signing.keyId')) {
|
||||||
|
signing {
|
||||||
|
sign configurations.archives
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task xbibUpload(type: Upload) {
|
task xbibUpload(type: Upload) {
|
||||||
|
group = 'publish'
|
||||||
configuration = configurations.archives
|
configuration = configurations.archives
|
||||||
uploadDescriptor = true
|
uploadDescriptor = true
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -15,6 +32,7 @@ task xbibUpload(type: Upload) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task sonatypeUpload(type: Upload) {
|
task sonatypeUpload(type: Upload) {
|
||||||
|
group = 'publish'
|
||||||
configuration = configurations.archives
|
configuration = configurations.archives
|
||||||
uploadDescriptor = true
|
uploadDescriptor = true
|
||||||
repositories {
|
repositories {
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Wed Oct 04 23:29:00 CEST 2017
|
#Thu Aug 16 18:31:50 CEST 2018
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
|
||||||
|
|
|
@ -6,18 +6,21 @@ dependencies {
|
||||||
compile project(':rpm-core')
|
compile project(':rpm-core')
|
||||||
compile "org.mvel:mvel2:${project.property('mvel.version')}"
|
compile "org.mvel:mvel2:${project.property('mvel.version')}"
|
||||||
compile "org.apache.ant:ant:${project.property('ant.version')}"
|
compile "org.apache.ant:ant:${project.property('ant.version')}"
|
||||||
|
|
||||||
compileOnly "org.apache.maven:maven-core:${project.property('maven.version')}"
|
compileOnly "org.apache.maven:maven-core:${project.property('maven.version')}"
|
||||||
compileOnly "org.apache.maven:maven-plugin-api:${project.property('maven.version')}"
|
compileOnly "org.apache.maven:maven-plugin-api:${project.property('maven.version')}"
|
||||||
compileOnly 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.5'
|
compileOnly "org.apache.maven.plugin-tools:maven-plugin-annotations:${project.property('maven-plugin-annotations.version')}"
|
||||||
|
|
||||||
testCompile "org.apache.maven:maven-core:${project.property('maven.version')}"
|
testCompile "org.apache.maven:maven-core:${project.property('maven.version')}"
|
||||||
testCompile "org.apache.maven:maven-plugin-api:${project.property('maven.version')}"
|
testCompile "org.apache.maven:maven-plugin-api:${project.property('maven.version')}"
|
||||||
testCompile 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.5'
|
testCompile "org.apache.maven.plugin-tools:maven-plugin-annotations:${project.property('maven-plugin-annotations.version')}"
|
||||||
|
|
||||||
mavenEmbedder "org.apache.maven:maven-embedder:${project.property('maven.version')}"
|
mavenEmbedder "org.apache.maven:maven-embedder:${project.property('maven.version')}"
|
||||||
mavenEmbedder 'org.slf4j:slf4j-simple:1.7.5'
|
mavenEmbedder "org.slf4j:slf4j-simple:1.7.25"
|
||||||
mavenEmbedder 'org.apache.maven.wagon:wagon-http:2.12:shaded'
|
mavenEmbedder "org.apache.maven.wagon:wagon-http:3.1.0:shaded"
|
||||||
mavenEmbedder 'org.apache.maven.wagon:wagon-provider-api:2.12'
|
mavenEmbedder "org.apache.maven.wagon:wagon-provider-api:3.1.0"
|
||||||
mavenEmbedder 'org.eclipse.aether:aether-connector-basic:1.0.2.v20150114'
|
mavenEmbedder "org.eclipse.aether:aether-connector-basic:1.1.0"
|
||||||
mavenEmbedder 'org.eclipse.aether:aether-transport-wagon:1.0.2.v20150114'
|
mavenEmbedder "org.eclipse.aether:aether-transport-wagon:1.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
@ -51,7 +54,7 @@ task generatePluginDescriptor(type: JavaExec, dependsOn: compileJava) {
|
||||||
'--batch-mode',
|
'--batch-mode',
|
||||||
'--settings', '../config/maven/repo-settings.xml',
|
'--settings', '../config/maven/repo-settings.xml',
|
||||||
'--file', "${buildDir}/pom.xml",
|
'--file', "${buildDir}/pom.xml",
|
||||||
"org.apache.maven.plugins:maven-plugin-plugin:3.5:descriptor"
|
"org.apache.maven.plugins:maven-plugin-plugin:${project.property('maven-plugin-plugin.version')}:descriptor"
|
||||||
]
|
]
|
||||||
doFirst {
|
doFirst {
|
||||||
install.repositories.mavenInstaller.pom.withXml {
|
install.repositories.mavenInstaller.pom.withXml {
|
||||||
|
|
Loading…
Reference in a new issue