From 0df9921910dbdd47b9027e54e900d92c2f53bcf5 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 3 Sep 2015 14:48:59 -0700 Subject: [PATCH 1/2] gradle: force java 7 --- MoreTeapots/app/build.gradle | 6 ++++++ Teapot/app/build.gradle | 6 ++++++ audio-echo/app/build.gradle | 6 ++++++ bitmap-plasma/app/build.gradle | 6 ++++++ endless-tunnel/app/build.gradle | 6 ++++++ hello-gl2/app/build.gradle | 6 ++++++ hello-jni/app/build.gradle | 6 ++++++ hello-thirdparty/app/build.gradle | 6 ++++++ native-activity/app/build.gradle | 6 ++++++ native-audio/app/build.gradle | 6 ++++++ native-codec/app/build.gradle | 6 ++++++ native-media/app/build.gradle | 6 ++++++ native-plasma/app/build.gradle | 6 ++++++ san-angeles/app/build.gradle | 6 ++++++ sensor-graph/app/build.gradle | 6 ++++++ 15 files changed, 90 insertions(+) diff --git a/MoreTeapots/app/build.gradle b/MoreTeapots/app/build.gradle index 3e6a887c9..8c9732166 100644 --- a/MoreTeapots/app/build.gradle +++ b/MoreTeapots/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName ="MoreTeapotsNativeActivity" cppFlags += "-I${file("src/main/jni/cpufeatures")}".toString() diff --git a/Teapot/app/build.gradle b/Teapot/app/build.gradle index ad8211752..6dfce236d 100644 --- a/Teapot/app/build.gradle +++ b/Teapot/app/build.gradle @@ -12,6 +12,12 @@ model { } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "TeapotNativeActivity" cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString() diff --git a/audio-echo/app/build.gradle b/audio-echo/app/build.gradle index ef707dc40..d681efa30 100644 --- a/audio-echo/app/build.gradle +++ b/audio-echo/app/build.gradle @@ -17,6 +17,12 @@ model { targetCompatibility=JavaVersion.VERSION_1_7 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "echo" cppFlags += ["-std=c++11"] diff --git a/bitmap-plasma/app/build.gradle b/bitmap-plasma/app/build.gradle index 600d4f45d..f748d9e09 100644 --- a/bitmap-plasma/app/build.gradle +++ b/bitmap-plasma/app/build.gradle @@ -12,6 +12,12 @@ model { } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "plasma" ldLibs += ["m","log","jnigraphics"] diff --git a/endless-tunnel/app/build.gradle b/endless-tunnel/app/build.gradle index ef8701631..8162174de 100644 --- a/endless-tunnel/app/build.gradle +++ b/endless-tunnel/app/build.gradle @@ -28,6 +28,12 @@ model { versionName = "1.0" } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "game" cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString() diff --git a/hello-gl2/app/build.gradle b/hello-gl2/app/build.gradle index 0fcc6e109..ce751a18a 100644 --- a/hello-gl2/app/build.gradle +++ b/hello-gl2/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "gl2jni" cppFlags += "-Werror" diff --git a/hello-jni/app/build.gradle b/hello-jni/app/build.gradle index 27040a807..8bf924b31 100644 --- a/hello-jni/app/build.gradle +++ b/hello-jni/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + /* * native build settings */ diff --git a/hello-thirdparty/app/build.gradle b/hello-thirdparty/app/build.gradle index 9d7c4da3e..0bdcb0cbb 100644 --- a/hello-thirdparty/app/build.gradle +++ b/hello-thirdparty/app/build.gradle @@ -17,6 +17,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "native-activity" cppFlags += "-I${file("src/main/jni")}".toString() diff --git a/native-activity/app/build.gradle b/native-activity/app/build.gradle index fb233f397..1787f6516 100644 --- a/native-activity/app/build.gradle +++ b/native-activity/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName ="native-activity" CFlags += "-I${file("src/main/jni/native_app_glue")}".toString() diff --git a/native-audio/app/build.gradle b/native-audio/app/build.gradle index b366e602e..c0b1c74c1 100644 --- a/native-audio/app/build.gradle +++ b/native-audio/app/build.gradle @@ -12,6 +12,12 @@ model { } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "native-audio-jni" ldLibs += ["android","OpenSLES", "log"] diff --git a/native-codec/app/build.gradle b/native-codec/app/build.gradle index 4d2477ac6..65e140e81 100644 --- a/native-codec/app/build.gradle +++ b/native-codec/app/build.gradle @@ -17,6 +17,12 @@ model { proguardFiles += file('proguard-rules.txt') } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "native-codec-jni" cppFlags += "-UNDEBUG" diff --git a/native-media/app/build.gradle b/native-media/app/build.gradle index d1a646d6b..ab479d4ba 100644 --- a/native-media/app/build.gradle +++ b/native-media/app/build.gradle @@ -12,6 +12,12 @@ model { } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "native-media-jni" CFlags += "-UNDEBUG" diff --git a/native-plasma/app/build.gradle b/native-plasma/app/build.gradle index b6b2487e9..42e1d5197 100644 --- a/native-plasma/app/build.gradle +++ b/native-plasma/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "native-plasma" CFlags += "-I${file("src/main/jni/native_app_glue")}".toString() diff --git a/san-angeles/app/build.gradle b/san-angeles/app/build.gradle index b5a91cba0..116357da0 100644 --- a/san-angeles/app/build.gradle +++ b/san-angeles/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "sanangeles" CFlags += "-DANDROID_NDK" diff --git a/sensor-graph/app/build.gradle b/sensor-graph/app/build.gradle index 5a44982c8..2c6805d78 100644 --- a/sensor-graph/app/build.gradle +++ b/sensor-graph/app/build.gradle @@ -11,6 +11,12 @@ model { targetSdkVersion.apiLevel = 23 } } + + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } + android.ndk { moduleName = "sensorgraph" cppFlags += "-Werror" From 9091ef1ffdc740635c251c296f1669641f97bd4d Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 3 Sep 2015 14:50:51 -0700 Subject: [PATCH 2/2] gles3jni: force java7 --- gles3jni/app/build-11.gradle | 4 ++++ gles3jni/app/build-18.gradle | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gles3jni/app/build-11.gradle b/gles3jni/app/build-11.gradle index 032d13e05..743728970 100644 --- a/gles3jni/app/build-11.gradle +++ b/gles3jni/app/build-11.gradle @@ -11,6 +11,10 @@ model { targetSdkVersion.apiLevel = 23 } } + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } android.ndk { moduleName = "gles3jni" cppFlags += "-Werror" diff --git a/gles3jni/app/build-18.gradle b/gles3jni/app/build-18.gradle index b8f87c2c2..7a2af5c44 100644 --- a/gles3jni/app/build-18.gradle +++ b/gles3jni/app/build-18.gradle @@ -11,6 +11,10 @@ model { targetSdkVersion.apiLevel = 23 } } + compileOptions.with { + sourceCompatibility=JavaVersion.VERSION_1_7 + targetCompatibility=JavaVersion.VERSION_1_7 + } android.ndk { moduleName = "gles3jni" cppFlags += "-Werror"