Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back to Gradle 8.10.2, except when using geb-with-webdriver-binaries #419

Merged
merged 1 commit into from
Nov 1, 2024
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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class Scope {
public static final Scope PROFILE = new Scope(Source.MAIN, Collections.singletonList(Phase.PROFILE));
public static final Scope INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES = new Scope(Source.MAIN, Collections.singletonList(Phase.INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES));


@NonNull
private Source source;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import org.grails.forge.feature.build.gradle.templates.buildSrcBuildGradle;
import org.grails.forge.feature.build.gradle.templates.gradleProperties;
import org.grails.forge.feature.build.gradle.templates.settingsGradle;
import org.grails.forge.feature.build.gradle.templates.gradleWrapperProperties;
import org.grails.forge.options.BuildTool;
import org.grails.forge.options.Options;
import org.grails.forge.template.BinaryTemplate;
import org.grails.forge.template.RockerTemplate;
import org.grails.forge.template.URLTemplate;

import java.util.Set;
import java.util.function.Function;
Expand Down Expand Up @@ -63,7 +63,6 @@ public void apply(GeneratorContext generatorContext) {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

generatorContext.addTemplate("gradleWrapperJar", new BinaryTemplate(WRAPPER_JAR, classLoader.getResource(WRAPPER_JAR)));
generatorContext.addTemplate("gradleWrapperProperties", new URLTemplate(WRAPPER_PROPS, classLoader.getResource(WRAPPER_PROPS)));
generatorContext.addTemplate("gradleWrapper", new BinaryTemplate("gradlew", classLoader.getResource("gradle/gradlew"), true));
generatorContext.addTemplate("gradleWrapperBat", new BinaryTemplate("gradlew.bat", classLoader.getResource("gradle/gradlew.bat"), false));

Expand Down Expand Up @@ -96,6 +95,8 @@ public void apply(GeneratorContext generatorContext) {
generatorContext.addTemplate("projectProperties", new RockerTemplate("gradle.properties", gradleProperties.template(generatorContext.getBuildProperties().getProperties())));
String settingsFile = "settings.gradle";
generatorContext.addTemplate("gradleSettings", new RockerTemplate(settingsFile, settingsGradle.template(generatorContext.getProject(), build, coordinateResolver, generatorContext.getFeatures())));

generatorContext.addTemplate("gradleWrapperProperties", new RockerTemplate(WRAPPER_PROPS, gradleWrapperProperties.template(generatorContext.getProject(), build, coordinateResolver, generatorContext.getFeatures())));
}

private void configureDefaultGradleProps(GeneratorContext generatorContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import org.grails.forge.feature.Features
@import org.grails.forge.options.TestFramework
@import org.grails.forge.util.VersionInfo
@import org.grails.forge.options.JdkVersion

@args (
ApplicationType applicationType,
Expand Down Expand Up @@ -55,8 +56,15 @@ application {

}

@if(features.contains("geb-with-webdriver-binaries")) {
// geb-with-webdriver-binaries is limited to Gradle 8.6 with max JDK 21
compileJava.options.release = @JdkVersion.valueOf(Math.min(features.javaVersion().majorVersion(), JdkVersion.JDK_21.majorVersion())).majorVersion()

} else {
compileJava.options.release = @features.getTargetJdk()

}

@if (features.contains("jrebel")) {
run {
dependsOn(generateRebel)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@import java.util.function.Function
@import org.grails.forge.application.Project
@import org.grails.forge.build.dependencies.CoordinateResolver
@import org.grails.forge.build.dependencies.Coordinate
@import org.grails.forge.build.gradle.GradleBuild
@import org.grails.forge.build.gradle.GradlePlugin
@import org.grails.forge.feature.Features

@args (
Project project,
GradleBuild gradleBuild,
Function<String, Coordinate> coordinateResolver,
Features features)

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
@if(features.contains("geb-with-webdriver-binaries")) {
# geb-with-webdriver-binaries is limited to Gradle 8.6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
} else {
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
}
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

This file was deleted.

Loading