Files
moxxy/android/app/build.gradle
Alexander "PapaTutuWawa c96880d437 fix(android): (Hopefully) fix build issues
Okay, so it turns out we cannot just have a plugin right
next to the actual app because then Flutter won't generate
both the GeneratedPluginRegistrant and the correct links to
the plugins. As such, we have to move the plugin code out of
Moxxy into the new moxxy_native library.

However, we need access to the activity to receive the notification
tap events (at least on Android). To fix this, we have a quirk that
checks if we have a notification event before finishing the handling
of the PreStartDoneEvent.
2023-09-08 15:33:39 +02:00

73 lines
1.8 KiB
Groovy

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
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'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
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 33
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "org.moxxy.moxxyv2"
minSdkVersion 26
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// Externally signed using a security key
signingConfig null
}
}
dependencies {
compileOnly rootProject.findProject(":moxxy_native")
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.activity:activity-ktx:1.7.2"
}