11buildscript {
2- ext. kotlin_version = ' 1.8.0 '
2+ ext. kotlin_version = ' 1.8.10 '
33 repositories {
44 google()
55 mavenCentral()
66 }
77
88 dependencies {
9- classpath ' com.android.tools.build:gradle:7.3 .0'
9+ classpath ' com.android.tools.build:gradle:8.7 .0'
1010 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
1111 }
1212}
@@ -27,10 +27,15 @@ subprojects {
2727apply plugin : ' com.android.application'
2828apply plugin : ' kotlin-android'
2929
30- def flutter = files(orcFlutter)
30+ def flutterFile = files(orcFlutter)
31+
32+ ext {
33+ flutter = [compileSdkVersion : 34 ]
34+ }
3135
3236android {
33- compileSdkVersion 34
37+ namespace " net.orchid.Orchid"
38+ compileSdkVersion flutter. compileSdkVersion
3439
3540 defaultConfig {
3641 applicationId orcUnique
@@ -65,6 +70,14 @@ android {
6570 targetCompatibility 1.8
6671 }
6772
73+ kotlinOptions {
74+ jvmTarget = " 1.8"
75+ }
76+
77+ buildFeatures {
78+ buildConfig true
79+ }
80+
6881 sourceSets {
6982 main {
7083 java. srcDirs + = [orcInterface + " /android/app/src/main/java" ]
@@ -75,7 +88,7 @@ android {
7588 }
7689
7790 dependencies {
78- implementation flutter
91+ implementation flutterFile
7992 implementation " org.jetbrains.kotlin:kotlin-reflect:$kotlin_version "
8093
8194 implementation " androidx.activity:activity:1.8.1"
@@ -105,19 +118,19 @@ plugins.plugins.android.each { dependency ->
105118 }
106119
107120 plugin. afterEvaluate {
108- plugin. android { compileSdkVersion 34 }
121+ plugin. android { compileSdkVersion flutter . compileSdkVersion }
109122
110123 plugin. android. buildTypes {
111124 profile {
112125 initWith debug
113126 }
114127 }
115128 plugin. dependencies {
116- compileOnly flutter
129+ compileOnly flutterFile
117130
118- // https://github.com/flutter/flutter/issues/56686
119- // WakelockPlugin.kt: Unresolved reference: NonNull
120131 implementation " androidx.annotation:annotation:1.0.0"
132+ implementation " com.android.support:support-annotations:28.0.0"
133+ implementation " org.jetbrains:annotations:24.0.1"
121134 }
122135 }
123136}
0 commit comments