Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
# Java 11 for Gradle 6.x support
java-version: |
11
17
Expand Down
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ group = "org.gradlex"
version = "1.12"

java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
implementation("org.ow2.asm:asm:9.8")

testImplementation("org.spockframework:spock-core:2.3-groovy-3.0")
testImplementation("org.spockframework:spock-core:2.3-groovy-4.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

Expand All @@ -39,7 +40,7 @@ tasks.test {
maxParallelForks = 4
}

listOf("6.8.3", "6.9.2", "7.0.2", "7.6.1").forEach { gradleVersionUnderTest ->
listOf("6.8.3", "6.9.4", "7.6.5", "8.14.2").forEach { gradleVersionUnderTest ->
val testGradle = tasks.register<Test>("testGradle$gradleVersionUnderTest") {
group = "verification"
description = "Runs tests against Gradle $gradleVersionUnderTest"
Expand All @@ -48,7 +49,9 @@ listOf("6.8.3", "6.9.2", "7.0.2", "7.6.1").forEach { gradleVersionUnderTest ->
useJUnitPlatform()
maxParallelForks = 4
systemProperty("gradleVersionUnderTest", gradleVersionUnderTest)
javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(11) }
if (gradleVersionUnderTest.startsWith("6")) {
javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(11) }
}
}
tasks.check {
dependsOn(testGradle)
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=7197a12f450794931532469d4ff21a59ea2c1cd59a3ec3f89c035c3c420a6999
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
distributionSha256Sum=5086034b0656a79fee07a04cfadc103984b075ac85d3a20748649671283be1bb
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-rc-1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.gradlex.javamodule.moduleinfo;

import org.gradle.api.NonNullApi;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.Transformer;
Expand Down Expand Up @@ -63,7 +62,6 @@
/**
* Entry point of the plugin.
*/
@NonNullApi
public abstract class ExtraJavaModuleInfoPlugin implements Plugin<Project> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.gradlex.javamodule.moduleinfo;

import org.gradle.api.NonNullApi;
import org.gradle.api.artifacts.CacheableRule;
import org.gradle.api.artifacts.transform.InputArtifact;
import org.gradle.api.artifacts.transform.TransformAction;
Expand Down Expand Up @@ -82,7 +81,6 @@
* was defined for it. This way we make sure that all Jars are turned into modules.
*/
@CacheableRule
@NonNullApi
public abstract class ExtraJavaModuleInfoTransform implements TransformAction<ExtraJavaModuleInfoTransform.Parameter> {

private static final Pattern MODULE_INFO_CLASS_MRJAR_PATH = Pattern.compile("META-INF/versions/\\d+/module-info.class");
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/gradlex/javamodule/moduleinfo/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright the GradleX team.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

@NullMarked
package org.gradlex.javamodule.moduleinfo;

import org.jspecify.annotations.NullMarked;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright the GradleX team.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

@NullMarked
package org.gradlex.javamodule.moduleinfo.tasks;

import org.jspecify.annotations.NullMarked;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RealModuleJarPreservePatchingFunctionalTest extends Specification {
'''
}

@IgnoreIf({ GradleBuild.gradleVersionUnderTest?.matches("[67]\\..*") }) // requires Gradle to support Java 17
@IgnoreIf({ GradleBuild.gradleVersionUnderTest?.startsWith("6") }) // requires Gradle to support Java 17
def "a real module cannot be extended via preserveExisting"() {
given:
buildFile << '''
Expand Down