Move product specific values to productFlavors

This commit is contained in:
Attila Uygun 2023-09-04 20:05:57 +02:00
parent 37afc006d2
commit e6d89add57
5 changed files with 15 additions and 13 deletions

View File

@ -103,7 +103,6 @@ android {
ndkVersion rootProject.ext.ndkVersion
defaultConfig {
applicationId rootProject.ext.applicationId
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk
ndk {
@ -127,12 +126,20 @@ android {
productFlavors {
helloWorld {
dimension 'game'
applicationId 'com.kaliber.helloworld'
resValue "string", "provider_name", "${applicationId}.fileprovider"
resValue "string", "app_name", "Kaliber Hello World"
resValue "string", "interstitial_ad_unit_id", ""
ext {
gnTarget = "hello_world"
}
}
demo {
dimension 'game'
applicationId 'com.kaliber.woom'
resValue "string", "provider_name", "${applicationId}.fileprovider"
resValue "string", "app_name", "Kaliber Demo"
resValue "string", "interstitial_ad_unit_id", "ca-app-pub-1321063817979967/8373182022"
ext {
gnTarget = "demo"
}
@ -155,7 +162,7 @@ android {
}
}
namespace rootProject.ext.applicationId
namespace "com.kaliber.base"
}
dependencies {

View File

@ -36,7 +36,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.woom.game.fileprovider"
android:authorities="@string/provider_name"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

View File

@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">woom</string>
<string name="interstitial_ad_unit_id">ca-app-pub-1321063817979967/8373182022</string>
</resources>

View File

@ -21,19 +21,17 @@ task clean(type: Delete) {
}
ext {
ndkVersion = '25.2.9519653'
minSdk = 24
compileSdk = 33
targetSdk = 33
if (!project.hasProperty('targetArchs')) {
targetArchs = ['Arm7', 'Arm8', 'X86_64', 'X86']
} else {
targetArchs = project.getProperty('targetArchs').split(',')
}
applicationId = 'com.woom.game'
ndkVersion = '25.2.9519653'
minSdk = 24
compileSdk = 33
targetSdk = 33
if (!project.hasProperty('gn')) {
gn = "gn"
}

View File

@ -24,7 +24,6 @@ import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
import com.google.android.gms.ads.interstitial.InterstitialAd;
import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;
import com.woom.game.R;
import java.io.File;