Skip to content

Commit

Permalink
fix(android): fix support for Java 8 in Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
ypbnv authored and sgtcoolguy committed Jan 23, 2020
1 parent 5ce5e72 commit 2287e83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion android/templates/build/app.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ android {
}
<% } %>
}
// TODO: Add Java 8 support in the future.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down
6 changes: 5 additions & 1 deletion android/templates/module/generated/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ android {
}
}
}
// TODO: Add Java 8 support in the future.

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -131,6 +131,10 @@ android {
exclude '/lib/**/libc++_shared.so'
exclude '/lib/**/libkroll-v8.so'
}
// Sets the JVM target in order to allow usage of Java 8 features in Kotlin native modules.
kotlinOptions {
jvmTarget = '1.8'
}
}

tasks.withType(JavaCompile) {
Expand Down
1 change: 0 additions & 1 deletion android/titanium/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ android {
]
}
}
// TODO: Add Java 8 support in the future.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down

0 comments on commit 2287e83

Please sign in to comment.