Skip to content
Open
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
4 changes: 0 additions & 4 deletions buildSrc/src/main/java/gradlebuild/VersioningPlugin.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package gradlebuild;

import org.gradle.api.JavaVersion;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.provider.ProviderFactory;
Expand Down Expand Up @@ -32,9 +31,6 @@ public abstract class VersioningPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
VersionDetails.BuildType buildType = determineBuildType(project);
if (buildType != VersionDetails.BuildType.Dev && JavaVersion.current() != JavaVersion.VERSION_1_8) {
throw new RuntimeException("Java 8 is required to build a release of native-platform. Later versions are not supported.");
}
String buildTimestamp = determineBuildTimestamp(project);
writeBuildTimestamp(buildTimestamp, project);
String version = determineVersion(buildType, buildTimestamp);
Expand Down
4 changes: 4 additions & 0 deletions native-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ java {
}
}

tasks.withType(JavaCompile).configureEach {
// Release to 8, since it's used in gradle/gradle in workers
options.release = 8
}
12 changes: 10 additions & 2 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ publishing {
}

// Download and unpack the application to allow it to be tested
task download {
tasks.register('download') {
def downloadDir = project.layout.buildDirectory.dir("download")
doLast {
copy {
from(configurations.download.files.collect { zipTree(it) })
into("$buildDir/download")
into(downloadDir)
}
}
}
Expand All @@ -53,3 +54,10 @@ task download {
tasks.named("run", JavaExec) {
standardInput = System.in
}

java {
toolchain {
// Configure Java 8, so we test that native-platform is compiled to Java 8
languageVersion = JavaLanguageVersion.of(8)
}
}
Loading