Examples: Android+OpenGL3: update Gradle project (#8888, #8878)

This commit is contained in:
scribam
2025-08-16 18:34:02 +02:00
committed by ocornut
parent 86ec5c8342
commit 361e370fe0
6 changed files with 45 additions and 47 deletions

View File

@@ -43,6 +43,8 @@ Breaking Changes:
Other Changes:
- Examples: Android: Android+OpenGL3: update Gradle project (#8888, #8878) [@scribam]
-----------------------------------------------------------------------
VERSION 1.92.2b (Released 2025-08-13)

View File

@@ -1,12 +1,14 @@
.cxx
.externalNativeBuild
build/
*.iml
.idea
.gradle
.idea
.DS_Store
/captures
.externalNativeBuild
.cxx
local.properties
# Android Studio puts a Gradle wrapper here, that we don't want:
gradle/
!gradle/libs.versions.toml
gradlew*

View File

@@ -1,16 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}
android {
compileSdkVersion 33
buildToolsVersion "33.0.2"
ndkVersion "25.2.9519653"
namespace 'imgui.example.android'
compileSdk 36
defaultConfig {
applicationId "imgui.example.android"
namespace "imgui.example.android"
minSdkVersion 24
targetSdkVersion 33
minSdk 24
targetSdk 36
versionCode 1
versionName "1.0"
}
@@ -21,26 +21,17 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget="11"
jvmTarget = '11'
}
externalNativeBuild {
cmake {
path "../../CMakeLists.txt"
path file('../../CMakeLists.txt')
version '3.22.1'
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="ImGuiExample"

View File

@@ -1,24 +1,5 @@
buildscript {
ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
}

View File

@@ -1 +1,22 @@
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
include ':app'