diff --git a/.gitignore b/.gitignore index cc177705e..1140eb43a 100644 --- a/.gitignore +++ b/.gitignore @@ -221,3 +221,4 @@ spine-godot/build/version.txt spine-godot/vc140.pdb spine-godot/example-v4-extension/bin spine-godot/example-v4-extension/MoltenVK.xcframework +spine-flutter/example/android/app/.cxx diff --git a/spine-flutter/android/build.gradle b/spine-flutter/android/build.gradle index 5e618a3be..6aac6715a 100644 --- a/spine-flutter/android/build.gradle +++ b/spine-flutter/android/build.gradle @@ -11,7 +11,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:8.5.1' } } @@ -33,7 +33,7 @@ android { // Bumping the plugin ndkVersion requires all clients of this plugin to bump // the version in their app and to download a newer version of the NDK. - ndkVersion "21.1.6352462" + ndkVersion "28.1.13356709" // Invoke the shared CMake build with the Android Gradle Plugin. externalNativeBuild { @@ -56,6 +56,6 @@ android { } defaultConfig { - minSdkVersion 16 + minSdkVersion 21 } } diff --git a/spine-flutter/example/.gitignore b/spine-flutter/example/.gitignore index 1eab1a228..13f41015a 100644 --- a/spine-flutter/example/.gitignore +++ b/spine-flutter/example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/spine-flutter/example/android/app/build.gradle b/spine-flutter/example/android/app/build.gradle index 672a97c81..5da267aea 100644 --- a/spine-flutter/example/android/app/build.gradle +++ b/spine-flutter/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,13 +22,11 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + // ndkVersion flutter.ndkVersion + ndkVersion "28.1.13356709" + namespace "com.esotericsoftware.spine.android" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -44,7 +43,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.spine_flutter_example" + applicationId "com.esotericsoftware.spine.android" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion flutter.minSdkVersion @@ -65,7 +64,3 @@ android { flutter { source '../..' } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/spine-flutter/example/android/app/src/debug/AndroidManifest.xml b/spine-flutter/example/android/app/src/debug/AndroidManifest.xml index cf5d5093b..399f6981d 100644 --- a/spine-flutter/example/android/app/src/debug/AndroidManifest.xml +++ b/spine-flutter/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - +