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 {
|
||||
id "org.sonarqube" version "2.5"
|
||||
id "io.codearte.nexus-staging" version "0.7.0"
|
||||
id "org.sonarqube" version "2.6.2"
|
||||
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: 'maven'
|
||||
apply plugin: 'signing'
|
||||
apply plugin: 'findbugs'
|
||||
apply plugin: 'pmd'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: "jacoco"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations {
|
||||
wagon
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
wagon 'org.apache.maven.wagon:wagon-ssh:2.12'
|
||||
testCompile "junit:junit:${project.property('junit.version')}"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
compileJava {
|
||||
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'
|
||||
|
||||
|
@ -47,62 +73,28 @@ allprojects {
|
|||
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 {
|
||||
properties {
|
||||
property "sonar.projectName", "xbib RPM"
|
||||
property "sonar.sourceEncoding", "UTF-8"
|
||||
property "sonar.tests", "src/test/java"
|
||||
property "sonar.scm.provider", "git"
|
||||
property "sonar.java.coveragePlugin", "jacoco"
|
||||
property "sonar.junit.reportsPath", "build/test-results/test/"
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
task sourcesJar(type: Jar) {
|
||||
classifier 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
classifier 'javadoc'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
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"
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
plugins {
|
||||
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: 'maven'
|
||||
apply plugin: 'signing'
|
||||
|
@ -35,8 +37,8 @@ test {
|
|||
|
||||
if (project.hasProperty('gradle.publish.key')) {
|
||||
pluginBundle {
|
||||
website = 'https://github.com/xbib/gradle-plugin-rpm'
|
||||
vcsUrl = 'https://github.com/xbib/gradle-plugin-rpm'
|
||||
website = 'https://github.com/xbib/rpm'
|
||||
vcsUrl = 'https://github.com/xbib/rpm'
|
||||
plugins {
|
||||
rpmPlugin {
|
||||
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
|
||||
|
||||
public static final String PROGRESS_TASK_PREFIX = "Execute :"
|
||||
public static final String PROGRESS_TASK_PREFIX = "Task :"
|
||||
|
||||
private GradleHandleBuildListener buildListener
|
||||
|
||||
|
@ -30,8 +30,8 @@ class BuildLauncherBackedGradleHandle implements GradleHandle {
|
|||
@Override
|
||||
void statusChanged(ProgressEvent event) {
|
||||
// These are free form strings, :-(
|
||||
if (event.getDescription().startsWith(PROGRESS_TASK_PREFIX)) { // E.g. "Execute :echo"
|
||||
String taskName = event.getDescription().substring(PROGRESS_TASK_PREFIX.length() - 1)
|
||||
if (event.description.startsWith(PROGRESS_TASK_PREFIX)) { // E.g. "Task :echo"
|
||||
String taskName = event.description.substring(PROGRESS_TASK_PREFIX.length() - 1)
|
||||
tasksExecuted.add(taskName)
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class BuildLauncherBackedGradleHandle implements GradleHandle {
|
|||
buildListener?.buildFinished()
|
||||
}
|
||||
String stdout = getStandardOutput()
|
||||
List<MinimalExecutedTask> tasks = new ArrayList<MinimalExecutedTask>()
|
||||
List<MinimalExecutedTask> tasks = new ArrayList<>()
|
||||
for (String taskName: tasksExecuted) {
|
||||
boolean upToDate = isTaskUpToDate(stdout, taskName)
|
||||
boolean skipped = isTaskSkipped(stdout, taskName)
|
||||
|
|
|
@ -21,6 +21,6 @@ task buildRpm(type: Rpm) {
|
|||
def result = runTasksSuccessfully('buildRpm')
|
||||
|
||||
then:
|
||||
result.wasUpToDate(':buildRpm')
|
||||
result.wasUpToDate('buildRpm')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
group = org.xbib
|
||||
name = rpm
|
||||
version = 1.0.1
|
||||
version = 1.0.2
|
||||
|
||||
bouncycastle.version = 1.57
|
||||
bouncycastle.version = 1.60
|
||||
xbib-archive.version = 0.0.1
|
||||
ant.version = 1.10.1
|
||||
log4j.version = 2.8.2
|
||||
junit.version = 4.12
|
||||
wagon.version = 2.12
|
||||
groovy.version = 2.4.11
|
||||
ant.version = 1.10.5
|
||||
log4j.version = 2.11.1
|
||||
# must match groovy version in gradle
|
||||
groovy.version = 2.4.12
|
||||
spock-core.version = 1.1-groovy-2.4
|
||||
xbib-guice.version = 4.0.4
|
||||
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) {
|
||||
group = 'publish'
|
||||
configuration = configurations.archives
|
||||
uploadDescriptor = true
|
||||
repositories {
|
||||
|
@ -15,6 +32,7 @@ task xbibUpload(type: Upload) {
|
|||
}
|
||||
|
||||
task sonatypeUpload(type: Upload) {
|
||||
group = 'publish'
|
||||
configuration = configurations.archives
|
||||
uploadDescriptor = true
|
||||
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
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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 "org.mvel:mvel2:${project.property('mvel.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-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-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.slf4j:slf4j-simple:1.7.5'
|
||||
mavenEmbedder 'org.apache.maven.wagon:wagon-http:2.12:shaded'
|
||||
mavenEmbedder 'org.apache.maven.wagon:wagon-provider-api:2.12'
|
||||
mavenEmbedder 'org.eclipse.aether:aether-connector-basic:1.0.2.v20150114'
|
||||
mavenEmbedder 'org.eclipse.aether:aether-transport-wagon:1.0.2.v20150114'
|
||||
mavenEmbedder "org.slf4j:slf4j-simple:1.7.25"
|
||||
mavenEmbedder "org.apache.maven.wagon:wagon-http:3.1.0:shaded"
|
||||
mavenEmbedder "org.apache.maven.wagon:wagon-provider-api:3.1.0"
|
||||
mavenEmbedder "org.eclipse.aether:aether-connector-basic:1.1.0"
|
||||
mavenEmbedder "org.eclipse.aether:aether-transport-wagon:1.1.0"
|
||||
}
|
||||
|
||||
test {
|
||||
|
@ -51,7 +54,7 @@ task generatePluginDescriptor(type: JavaExec, dependsOn: compileJava) {
|
|||
'--batch-mode',
|
||||
'--settings', '../config/maven/repo-settings.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 {
|
||||
install.repositories.mavenInstaller.pom.withXml {
|
||||
|
|
Loading…
Reference in a new issue