diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17aabecbd..45688c470 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -504,4 +504,4 @@ jobs: - name: Build example_android_opengl3 run: | cd examples/example_android_opengl3/android - gradle assembleDebug + gradle assembleDebug --stacktrace diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index efed7a3cd..2ad355e21 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -57,6 +57,7 @@ Other changes: non-client area (e.g. OS decorations) when app is not focused. (#6045, #6162) - Backends: SDL2, SDL3: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644) [@adamkewley] +- Examples: Android: Fixed example build for Gradle 8. (#6229, #6227) [@duddel] ----------------------------------------------------------------------- diff --git a/examples/example_android_opengl3/android/app/build.gradle b/examples/example_android_opengl3/android/app/build.gradle index aa7f0eadd..53181baa2 100644 --- a/examples/example_android_opengl3/android/app/build.gradle +++ b/examples/example_android_opengl3/android/app/build.gradle @@ -2,13 +2,15 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion 29 - buildToolsVersion "30.0.3" - ndkVersion "21.4.7075529" + compileSdkVersion 33 + buildToolsVersion "33.0.2" + ndkVersion "25.2.9519653" + defaultConfig { applicationId "imgui.example.android" - minSdkVersion 23 - targetSdkVersion 29 + namespace "imgui.example.android" + minSdkVersion 24 + targetSdkVersion 33 versionCode 1 versionName "1.0" } @@ -20,9 +22,19 @@ android { } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget="11" + } + externalNativeBuild { cmake { path "../../CMakeLists.txt" + version '3.22.1' } } } diff --git a/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml b/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml index c4009e529..a87b95b4f 100644 --- a/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml +++ b/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + + android:configChanges="orientation|keyboardHidden|screenSize" + android:exported="false"> diff --git a/examples/example_android_opengl3/android/build.gradle b/examples/example_android_opengl3/android/build.gradle index 59f9c78e4..ccd218524 100644 --- a/examples/example_android_opengl3/android/build.gradle +++ b/examples/example_android_opengl3/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.4.31' + ext.kotlin_version = '1.8.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }