Skip to content

Fail if JDK_16 is not set #296

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

Closed
wants to merge 3 commits into from
Closed
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ To avoid field overloading by type during obfuscation, add this to your config:
}
```

## Building
This library is built with Gradle. To build it, use ./gradlew build.

### Requirements
* JDK >=1.6 referred to by the `JAVA_HOME` environment variable.
* JDK 1.6 referred to by the `JDK_16` environment variable.

## Contributions and releases

All development (both new features and bug fixes) is performed in `develop` branch.
Expand Down
5 changes: 4 additions & 1 deletion core/kotlinx-coroutines-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ task lockFreedomTest(type: Test, dependsOn: testClasses) {
include '**/*LFTest.*'
}

if (!System.env.JDK_16)
ant.fail("JDK_16 not defined. Can't run JDK 1.6 compatibility tests. Please ensure JDK 1.6 is installed and that JDK_16 points to it.")

task jdk16Test(type: Test, dependsOn: testClasses) {
executable = "$System.env.JDK_16/bin/java"
exclude '**/*LinearizabilityTest.*'
Expand All @@ -41,4 +44,4 @@ task testsJar(type: Jar, dependsOn: testClasses) {

artifacts {
archives testsJar
}
}