mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-31 03:00:05 +00:00
Projucer: Enforce old Java language version for Android projects
Although Java bytecode/language features are supported on higher Android API levels, JUCE must support back to Android 24, which requires Java version 8 or earlier.
This commit is contained in:
parent
4023687d89
commit
8c264cc8bb
9 changed files with 22 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
def ndkVersionString = "28.1.13356709"
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
||||
}
|
||||
rootProject.name = 'DemoRunner'
|
||||
include ':app'
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
def ndkVersionString = "28.1.13356709"
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
||||
}
|
||||
rootProject.name = 'AudioPerformanceTest'
|
||||
include ':app'
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
def ndkVersionString = "28.1.13356709"
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
||||
}
|
||||
rootProject.name = 'AudioPluginHost'
|
||||
include ':app'
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
def ndkVersionString = "28.1.13356709"
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
||||
}
|
||||
rootProject.name = 'NetworkGraphicsDemo'
|
||||
include ':app'
|
||||
|
|
@ -653,6 +653,10 @@ private:
|
|||
MemoryOutputStream mo;
|
||||
mo.setNewLineString (getNewLineString());
|
||||
|
||||
mo << "plugins {" << newLine
|
||||
<< " id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'" << newLine
|
||||
<< "}" << newLine;
|
||||
|
||||
mo << "rootProject.name = " << "\'" << escapeQuotes (projectName) << "\'" << newLine;
|
||||
mo << (isLibrary() ? "include ':lib'" : "include ':app'");
|
||||
|
||||
|
|
@ -698,6 +702,8 @@ private:
|
|||
|
||||
mo << "apply plugin: 'com.android." << (isLibrary() ? "library" : "application") << "'" << newLine << newLine;
|
||||
|
||||
// Language version 8 (or lower) is required for compatibility with Android 24
|
||||
mo << "java.toolchain.languageVersion = JavaLanguageVersion.of(8)" << newLine;
|
||||
// NDK 26 is required for ANDROID_WEAK_API_DEFS, which is in turn required for weak-linking AFontMatcher
|
||||
mo << "def ndkVersionString = \"28.1.13356709\"" << newLine << newLine;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue