File tree Expand file tree Collapse file tree 7 files changed +35
-14
lines changed Expand file tree Collapse file tree 7 files changed +35
-14
lines changed Original file line number Diff line number Diff line change 1
1
apply plugin : ' java-library'
2
2
3
- sourceCompatibility = JavaVersion . VERSION_1_8
4
- targetCompatibility = JavaVersion . VERSION_1_8
3
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
4
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
5
+ compileJava {
6
+ options. release. set(8 )
7
+ }
5
8
6
9
task javadocJar (type : Jar , dependsOn : javadoc) {
7
10
archiveClassifier. set(' javadoc' )
Original file line number Diff line number Diff line change 1
1
apply plugin : ' java-library'
2
2
apply plugin : " com.github.spotbugs"
3
3
4
- sourceCompatibility = JavaVersion . VERSION_1_8
5
- targetCompatibility = JavaVersion . VERSION_1_8
4
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
5
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
6
+ compileJava {
7
+ options. release. set(8 )
8
+ }
6
9
7
10
ext {
8
11
javadocForWebDir = " $buildDir /docs/web-api-docs"
Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ buildscript {
5
5
apply plugin : ' kotlin'
6
6
apply plugin : ' org.jetbrains.dokka'
7
7
8
- sourceCompatibility = JavaVersion . VERSION_1_8
9
- targetCompatibility = JavaVersion . VERSION_1_8
8
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
9
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
10
+ compileJava {
11
+ options. release. set(8 )
12
+ }
10
13
11
14
// Produce Java 8 byte code, would default to Java 6.
12
15
tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
Original file line number Diff line number Diff line change 1
1
apply plugin : ' java-library'
2
2
3
- sourceCompatibility = JavaVersion . VERSION_1_8
4
- targetCompatibility = JavaVersion . VERSION_1_8
3
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
4
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
5
+ compileJava {
6
+ options. release. set(8 )
7
+ }
5
8
6
9
dependencies {
7
10
api project(' :objectbox-java' )
Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ apply plugin: 'java-library'
6
6
apply plugin : ' kotlin'
7
7
apply plugin : ' org.jetbrains.dokka'
8
8
9
- sourceCompatibility = JavaVersion . VERSION_1_8
10
- targetCompatibility = JavaVersion . VERSION_1_8
9
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
10
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
11
+ compileJava {
12
+ options. release. set(8 )
13
+ }
11
14
12
15
// Produce Java 8 byte code, would default to Java 6.
13
16
tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ apply plugin: 'kotlin'
3
3
4
4
uploadArchives. enabled = false
5
5
6
- sourceCompatibility = JavaVersion . VERSION_1_8
7
- targetCompatibility = JavaVersion . VERSION_1_8
6
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
7
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
8
+ compileJava {
9
+ options. release. set(8 )
10
+ }
8
11
9
12
// Produce Java 8 byte code, would default to Java 6.
10
13
tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ apply plugin: 'java-library'
2
2
3
3
uploadArchives. enabled = false
4
4
5
- sourceCompatibility = JavaVersion . VERSION_1_8
6
- targetCompatibility = JavaVersion . VERSION_1_8
5
+ // Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
6
+ // https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
7
+ compileJava {
8
+ options. release. set(8 )
9
+ }
7
10
8
11
repositories {
9
12
// Native lib might be deployed only in internal repo
You can’t perform that action at this time.
0 commit comments