Ad and purchases enabled (still need actual testing)
This commit is contained in:
parent
2fcc6dcab7
commit
faf319322a
35 changed files with 1676 additions and 34 deletions
|
|
@ -1,11 +1,24 @@
|
|||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
// Release signing credentials — see key.properties (gitignored; the
|
||||
// keystore file itself lives outside the repo, at the path it points to).
|
||||
// Missing entirely just means a debug-signed release build, same as
|
||||
// before, so this doesn't break local dev if key.properties isn't set up.
|
||||
val keystoreProperties = Properties()
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.courtneyarnold.fuel_tax_tracker"
|
||||
namespace = "com.ohbrer.show_me_the_fuel_refund"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
|
|
@ -15,8 +28,7 @@ android {
|
|||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.courtneyarnold.fuel_tax_tracker"
|
||||
applicationId = "com.ohbrer.show_me_the_fuel_refund"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
|
|
@ -25,11 +37,31 @@ android {
|
|||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
create("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
// Real release signing once key.properties exists (see above);
|
||||
// falls back to the debug key otherwise, so `flutter run
|
||||
// --release` still works for local testing without it.
|
||||
signingConfig = if (keystorePropertiesFile.exists()) {
|
||||
signingConfigs.getByName("release")
|
||||
} else {
|
||||
signingConfigs.getByName("debug")
|
||||
}
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
android/app/proguard-rules.pro
vendored
Normal file
14
android/app/proguard-rules.pro
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# google_mlkit_text_recognition's plugin code references all of ML Kit's
|
||||
# regional script recognizers (Chinese/Devanagari/Japanese/Korean)
|
||||
# generically, even though this app only depends on (and only ever uses)
|
||||
# the default Latin recognizer. R8 can't resolve the others since their
|
||||
# artifacts genuinely aren't on the classpath — safe to silence, they're
|
||||
# never called at runtime here.
|
||||
-dontwarn com.google.mlkit.vision.text.chinese.ChineseTextRecognizerOptions$Builder
|
||||
-dontwarn com.google.mlkit.vision.text.chinese.ChineseTextRecognizerOptions
|
||||
-dontwarn com.google.mlkit.vision.text.devanagari.DevanagariTextRecognizerOptions$Builder
|
||||
-dontwarn com.google.mlkit.vision.text.devanagari.DevanagariTextRecognizerOptions
|
||||
-dontwarn com.google.mlkit.vision.text.japanese.JapaneseTextRecognizerOptions$Builder
|
||||
-dontwarn com.google.mlkit.vision.text.japanese.JapaneseTextRecognizerOptions
|
||||
-dontwarn com.google.mlkit.vision.text.korean.KoreanTextRecognizerOptions$Builder
|
||||
-dontwarn com.google.mlkit.vision.text.korean.KoreanTextRecognizerOptions
|
||||
|
|
@ -48,6 +48,15 @@
|
|||
<data android:scheme="mofueltaxback-onedrive" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Real AdMob App ID (from your own AdMob console). The ad unit
|
||||
served under it is still Google's official *test* interstitial
|
||||
ID for now (lib/services/ad_service.dart) — that keeps showing
|
||||
real, clearly-labeled test creatives (no revenue) until a real
|
||||
interstitial ad unit ID created under this app is swapped in
|
||||
there too. -->
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.ads.APPLICATION_ID"
|
||||
android:value="ca-app-pub-9212406812117696~6413414381"/>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.courtneyarnold.fuel_tax_tracker
|
||||
package com.ohbrer.show_me_the_fuel_refund
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue