Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Oct 1, 2024
1 parent 05b98a2 commit d70d9a4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
19 changes: 18 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ android {
targetCompatibility JavaVersion.VERSION_17
}

packagingOptions {
jniLibs {
useLegacyPackaging true
}
}

kotlinOptions {
jvmTarget = '17'
}
Expand All @@ -58,6 +64,7 @@ android {
targetSdk 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled = true
}

flavorDimensions "flavor"
Expand Down Expand Up @@ -92,7 +99,12 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
shrinkResources false
minifyEnabled = true
shrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
debug {
applicationIdSuffix '.debug'
Expand All @@ -106,3 +118,8 @@ flutter {
source '../..'
}


dependencies {
implementation("androidx.multidex:multidex:2.0.1")
}

31 changes: 31 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


# To ignore minifyEnabled: true error
# https://github.com/flutter/flutter/issues/19250
# https://github.com/flutter/flutter/issues/37441
-ignorewarnings
-keep class * {
public private *;
}
4 changes: 1 addition & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
android:label="Musify"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true"
android:extractNativeLibs="true"
tools:replace="android:extractNativeLibs">
android:enableOnBackInvokedCallback="true">

<!-- AudioServiceActivity -->
<activity
Expand Down

0 comments on commit d70d9a4

Please sign in to comment.