Skip to content

Commit

Permalink
Upgrade to gradle 7.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed May 17, 2023
1 parent 2e22ec2 commit 2cd1026
Show file tree
Hide file tree
Showing 26 changed files with 100 additions and 175 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Build
uses: eskatos/gradle-command-action@v1
with:
arguments: -i -S --console=plain --no-build-cache assemble validateTaskProperties
arguments: -i -S --console=plain --no-build-cache assemble ValidatePlugins
# Unit tests
- name: Unit tests
uses: eskatos/gradle-command-action@v1
Expand Down
16 changes: 10 additions & 6 deletions base-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ ext {

dependencies {

compile project(':jruby-gradle-core-plugin')
runtime('de.saumya.mojo:rubygems:0.2.3@war') {
implementation project(':jruby-gradle-core-plugin')
runtimeOnly('de.saumya.mojo:rubygems:0.2.3@war') {
// we just want the war file on the classloader for the application
// to find it and use the war-file from filesystem
exclude group: 'org.sonatype.nexus.plugins', module: 'nexus-ruby-tools'
}

testJRubyPrepare "org.jruby:jruby-complete:${jrubyVersion}"

testCompile(spockVersion) {
testImplementation(spockVersion) {
exclude module: 'groovy-all'
exclude group: 'org.codehaus.groovy'
}
Expand Down Expand Up @@ -92,6 +92,9 @@ integrationTest {
systemProperties 'TESTS_ARE_OFFLINE': '1'
}
dependsOn copyIntegrationTestJRuby
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
}
}

task installGroovyDoc(type: Copy) {
Expand All @@ -102,13 +105,14 @@ task installGroovyDoc(type: Copy) {
onlyIf { project.hasProperty('jrubyGradleWebsiteInstallDir') }
}

pluginBundle {
gradlePlugin {
plugins {
gradlePlugin {
basePlugin {
id = 'com.github.jruby-gradle.base'
implementationClass = 'com.github.jrubygradle.JRubyPlugin'
displayName = 'JRuby/Gradle base plugin'
description = 'The purpose of plugin is to encapsulate useful Gradle functionality for JRuby projects'
tags = (['jruby'])
// tags.set(['jruby'])
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class JRubyExec extends JavaExec implements JRubyAwareTask, JRubyExecSpec {

JRubyExec() {
super()
super.setMain(MAIN_CLASS)
super.mainClass.set(MAIN_CLASS)
this.jruby = extensions.create(JRubyPluginExtension.NAME, JRubyPluginExtension, this)
this.projectOperations = ProjectOperations.create(project)
this.tasks = project.tasks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class JRubyPluginExtension extends AbstractCombinedProjectTaskExtension {
} else if (this.gemConfiguration) {
this.gemConfiguration.get()
} else {
extFromProject.gemConfiguration
extFromProject.gemConfiguration.get()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class JRubyExecUtils {
cmdArgs.addAll(jrubyArgs)

if (useBinPath && script != null) {
if (script.isAbsolute() && (!script.exists())) {
if (script.absolute && (!script.exists())) {
throw new InvalidUserDataException("${script} does not exist")
}
cmdArgs.add(script.toString())
Expand All @@ -184,7 +184,7 @@ class JRubyExecUtils {
throw new InvalidUserDataException('No `script` property defined and no inline script provided')
}

if (jrubyArgs.isEmpty()) {
if (jrubyArgs.empty) {
throw new InvalidUserDataException('Cannot build JRuby execution arguments with either `script` or `jrubyArgs` set')
}
}
Expand Down

This file was deleted.

31 changes: 13 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
plugins {
id 'com.gradle.build-scan' version '2.0.2'
id 'org.ysb33r.gradletest' version '2.0-rc.4' apply false
id 'org.ysb33r.gradletest' version '3.0.0-alpha.1' apply false
id 'org.ajoberstar.github-pages' version '1.2.0' apply false
id 'com.github.hierynomus.license' version '0.14.0' apply false
id 'io.ratpack.ratpack-java' version "1.6.1" apply false
id 'com.gradle.plugin-publish' version '0.14.0' apply false
}

buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
id 'com.gradle.plugin-publish' version '1.2.0' apply false
// id 'java-gradle-plugin'
}

allprojects {
Expand All @@ -25,7 +20,7 @@ allprojects {

ext {
olderJRubyVersion = '9.4.1.0'
spockVersion = "org.spockframework:spock-core:1.2-groovy-2.4"
spockVersion = "org.spockframework:spock-core:2.3-groovy-3.0"
pluginExtraText = (version.contains('-alpha') || version.contains('-beta')) ?
'(If you need a production-ready version of the JRuby/Gradle plugin use a 1.7.x release instead)': ''
}
Expand All @@ -48,10 +43,10 @@ subprojects {
apply from: "${rootProject.projectDir}/gradle/license.gradle"

dependencies {
compile localGroovy()
compile gradleApi()
compile "org.ysb33r.gradle:grolifant60:${grolifantVersion}"
gradleTestRuntime "org.ysb33r.gradle:grolifant60:${grolifantVersion}"
implementation localGroovy()
implementation gradleApi()
implementation "org.ysb33r.gradle:grolifant70:${grolifantVersion}"
gradleTestRuntimeOnly "org.ysb33r.gradle:grolifant70:${grolifantVersion}"
}

codenarc {
Expand All @@ -74,7 +69,7 @@ subprojects {
gradleTest {
// https://github.com/jruby-gradle/jruby-gradle-plugin/issues/346
if (JavaVersion.current().java11) {
versions '5.0', '5.4.1', '6.0.1', '6.7'
versions '7.6.1', '8.1.1'
} else {
versions '4.10.2', '5.3.1', '6.0.1', '6.7'

Expand Down Expand Up @@ -106,10 +101,10 @@ subprojects {
ideReport.destination = file( "${project.codenarc.reportsDir}/${reportName}.ide.txt")
}

tasks.withType(ValidateTaskProperties) { validateTaskProperties ->
validateTaskProperties.failOnWarning = true
validateTaskProperties.enableStricterValidation = true
}
// tasks.withType(ValidatePlugins).configureEach { ValidatePlugins ->
// ValidatePlugins.failOnWarning = true
// ValidatePlugins.enableStricterValidation = true
// }
}


Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ plugins {
}

dependencies {
compile localGroovy()
compile gradleApi()
implementation localGroovy()
implementation gradleApi()
}
10 changes: 6 additions & 4 deletions core-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ dependencies {
implementation "io.ratpack:ratpack-core:${ratpackVersion}"
integrationTestCompile gradleTestKit()

testCompile(spockVersion) {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation(spockVersion) {
exclude module: 'groovy-all'
exclude group: 'org.codehaus.groovy'
}
Expand All @@ -18,13 +19,14 @@ artifacts {
archives sourcesJar
}

pluginBundle {
gradlePlugin {
plugins {
gradlePlugin {
corePlugin {
id = 'com.github.jruby-gradle.core'
implementationClass = 'com.github.jrubygradle.api.core.JRubyCorePlugin'
displayName = 'JRuby/Gradle core plugin'
description = 'This plugin provides some core dependency resolution for JRuby/Gradle'
tags = (['jruby'])
// tags.set(['jruby'])
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ class GemResolverStrategy {
Pattern module
Pattern version

def Matcher(values) {
module = values['module'] as Pattern
version = values['version'] as Pattern
println "module: " + module
println "version: " + version
}

boolean match(String name, String ver) {
name =~ module && (this.version == null || ver ==~ this.version)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class DefaultRubyGemRestApi implements com.github.jrubygradle.api.core.RubyGemQu
configure {
request.uri = uri
client.clientCustomizer { OkHttpClient.Builder builder ->
builder.followRedirects(true)
builder.followSslRedirects(true)
// builder.followRedirects(true)
// builder.followSslRedirects(true)
}
}
}
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}
dependencies {
/* wow. so recursion */
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.0.3"
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.1.1"
}
}
apply plugin: 'org.ajoberstar.github-pages'
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/executable-jar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}
plugins {
id "com.github.jruby-gradle.jar" version "0.1.2"
id "com.github.johnrengelman.shadow" version "1.1.2"
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

apply plugin: 'java'
Expand Down
2 changes: 1 addition & 1 deletion examples/self-executing-jar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
/* here to make sure that our dependencies get loaded in properly under
* GradleTest, this is NOT needed by end-users
*/
classpath 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)'
classpath 'com.github.jengelman.gradle.plugins:shadow:[7.0,8.0)'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=2.1.0-beta.0
version=2.1.0-beta.1
group=com.github.jruby-gradle
copyrightYear=2014-2023

Expand All @@ -12,7 +12,7 @@ releaseBuild=false
targetCompatibility=1.8
sourceCompatibility=1.8

grolifantVersion=1.3.3
grolifantVersion=2.0.0
jrubyVersion=9.4.2.0
jettyVersion=9.2.12.v20150709
bcprovVersion=1.46
Expand Down
4 changes: 2 additions & 2 deletions gradle/integration-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

configurations {
integrationTestCompile {
extendsFrom testCompile
extendsFrom testImplementation
}
integrationTestRuntime {
extendsFrom integrationTestCompile, testRuntime
extendsFrom integrationTestCompile, testRuntimeOnly
}
integrationTestGems
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions jar-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


ext {
testRepoDir = new File(buildDir,'tmp/test/repo' )
}
Expand All @@ -15,18 +13,24 @@ generateTestConfig {
flatrepo: testRepoDir.absolutePath
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
compile project(':jruby-gradle-base-plugin')
implementation project(':jruby-gradle-base-plugin')
implementation project(':jruby-gradle-core-plugin')
/*
* NOTE: version 5.0.0 of the shadow plugin supports only Gradle 5.x and later
*/
compile 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
compile 'org.codehaus.plexus:plexus-utils:[3.2.0,3.3)'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'org.ow2.asm:asm-commons:[6.1,6.99)'
compile 'org.apache.ant:ant:[1.10.6,2.0)'
implementation 'com.github.johnrengelman:shadow:8.1.1'
implementation 'org.codehaus.plexus:plexus-utils:[3.2.0,3.3)'
implementation 'org.apache.commons:commons-io:1.3.2'
implementation 'org.ow2.asm:asm-commons:[6.1,6.99)'
implementation 'org.apache.ant:ant:[1.10.6,2.0)'

testCompile (spockVersion) {
testImplementation (spockVersion) {
exclude module : 'groovy-all'
}

Expand Down Expand Up @@ -87,13 +91,14 @@ artifacts {
archives sourcesJar
}

pluginBundle {
gradlePlugin {
plugins {
gradlePlugin {
jarPlugin {
id = 'com.github.jruby-gradle.jar'
implementationClass = 'com.github.jrubygradle.api.jar.JRubyCorePlugin'
displayName = 'JRuby/Gradle base plugin'
description = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects'
tags = (['jruby','fatjar'])
// tags.set(['jruby','fatjar'])
}
}
}
Expand Down

0 comments on commit 2cd1026

Please sign in to comment.