Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGP 8 compatibility #29

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions coinlib_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,35 @@ group 'com.example.coinlib_flutter'
version '1.0'

buildscript {
ext.kotlin_version = "1.8.22"
repositories {
google()
mavenCentral()
}

dependencies {
// The Android Gradle Plugin knows how to build native code with the NDK.
classpath 'com.android.tools.build:gradle:7.2.0'
classpath("com.android.tools.build:gradle:8.1.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}

rootProject.allprojects {
allprojects {
repositories {
google()
mavenCentral()
}
}

apply plugin: 'com.android.library'
apply plugin: "com.android.library"
apply plugin: "kotlin-android"

android {
if (project.android.hasProperty("namespace")) {
MatthewLM marked this conversation as resolved.
Show resolved Hide resolved
namespace = "com.example.coinlib_flutter"
}
// Bumping the plugin compileSdkVersion requires all clients of this plugin
// to bump the version in their app.
compileSdkVersion 31
compileSdk = 34

// 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.
Expand All @@ -52,8 +57,13 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion 16
minSdk 21
externalNativeBuild {
cmake {
// Final step in the Android build process
Expand All @@ -66,6 +76,8 @@ android {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
MatthewLM marked this conversation as resolved.
Show resolved Hide resolved
}

}
Loading