From 249de9e0c9d74730b2ba81480c64b60997901ab6 Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Fri, 17 May 2024 09:51:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E6=B7=BB=E5=8A=A0=E5=AE=8C=E6=AF=95wa?= =?UTF-8?q?llpaper.jsk=E4=B9=8B=E5=90=8E,=E5=86=8D=E5=9C=A8=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E9=85=8D=E7=BD=AE=E7=AD=BE=E5=90=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF;=20jsk=E7=94=9F=E6=88=90=E6=96=B9=E5=BC=8F,=E9=80=9A?= =?UTF-8?q?=E8=BF=87keytool=E5=91=BD=E4=BB=A4,=E6=89=A7=E8=A1=8Ckeytool=20?= =?UTF-8?q?-genkey=20-v=20-keystore=20wallpaper.jks=20-alias=20wallpaper?= =?UTF-8?q?=20-keyalg=20RSA=20-keysize=202048=20-validity=2036500,?= =?UTF-8?q?=E5=85=B6=E4=B8=ADwallpaper.jks=20=E4=B8=8E=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E7=9A=84wallpaper=E5=90=8D=E7=A7=B0=E5=8F=AA=E8=A6=81=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E4=B8=80=E8=87=B4=E5=8D=B3=E5=8F=AF(=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8F=96=E4=BB=BB=E6=84=8F=E5=90=8D=E7=A7=B0),?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E9=83=A8=E5=88=86=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=9B=B4=E6=94=B9:=20/Applications/Android\=20Studio.app/Conte?= =?UTF-8?q?nts/jbr/Contents/Home/bin/keytool=20-genkey=20-v=20-keystore=20?= =?UTF-8?q?wallpaper.jks=20-alias=20wallpaper=20-keyalg=20RSA=20-keysize?= =?UTF-8?q?=202048=20-validity=2036500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wallpaper/android/app/build.gradle | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/wallpaper/android/app/build.gradle b/wallpaper/android/app/build.gradle index 08c356b..7b153a8 100644 --- a/wallpaper/android/app/build.gradle +++ b/wallpaper/android/app/build.gradle @@ -22,8 +22,12 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +def keystorePropertiesFile = rootProject.file("key.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + android { - namespace "com.lux.wallpapertoday" + namespace "com.example.wallpaper" compileSdk flutter.compileSdkVersion ndkVersion flutter.ndkVersion @@ -42,7 +46,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.wallpaper" + applicationId "com.lux.wallpapertoday" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion flutter.minSdkVersion @@ -51,11 +55,27 @@ android { versionName flutterVersionName } - buildTypes { + signingConfigs { release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + + buildTypes { + debug { + signingConfig signingConfigs.release + } + + release { + ndk{ + abiFilters "armeabi", "armeabi-v7a", "arm64-v8a" + } // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release } } }