diff --git a/lib/amazon/build.gradle b/lib/amazon/build.gradle index 1da2947..0cdadea 100644 --- a/lib/amazon/build.gradle +++ b/lib/amazon/build.gradle @@ -51,10 +51,12 @@ android { buildTypes { debug { minifyEnabled false + buildConfigField "String", "VERSION", "\"" + project.ext.get("billingzVersion") + "\"" } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + buildConfigField "String", "VERSION", "\"" + project.ext.get("billingzVersion") + "\"" } } compileOptions { @@ -65,7 +67,7 @@ android { jvmTarget = LibraryInfo.kotlinJvmTarget } buildFeatures { - viewBinding true + buildConfig true } lintOptions { // set to true to turn off analysis progress reporting by lint diff --git a/lib/amazon/src/main/java/com/zuko/billingz/amazon/store/AmazonStore.kt b/lib/amazon/src/main/java/com/zuko/billingz/amazon/store/AmazonStore.kt index 5eff95a..57ad38f 100644 --- a/lib/amazon/src/main/java/com/zuko/billingz/amazon/store/AmazonStore.kt +++ b/lib/amazon/src/main/java/com/zuko/billingz/amazon/store/AmazonStore.kt @@ -23,6 +23,7 @@ import android.content.Context import android.os.Bundle import androidx.collection.ArrayMap import androidx.lifecycle.LiveData +import com.zuko.billingz.amazon.BuildConfig import com.zuko.billingz.amazon.store.client.AmazonClient import com.zuko.billingz.amazon.store.inventory.AmazonInventory import com.zuko.billingz.amazon.store.model.AmazonOrder @@ -63,7 +64,12 @@ class AmazonStore internal constructor() : Storez { } override fun init(context: Context?) { - Logger.v(TAG, "initializing...") + Logger.v( + TAG, "Initializing client..." + + "\n debug: ${BuildConfig.DEBUG}" + + "\n build: ${BuildConfig.BUILD_TYPE}" + + "\n version: ${BuildConfig.VERSION}" + ) this.context = context } diff --git a/lib/google/build.gradle b/lib/google/build.gradle index db03c1e..38e9c94 100644 --- a/lib/google/build.gradle +++ b/lib/google/build.gradle @@ -51,10 +51,12 @@ android { buildTypes { debug { minifyEnabled false + buildConfigField "String", "VERSION", "\"" + project.ext.get("billingzVersion") + "\"" } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + buildConfigField "String", "VERSION", "\"" + project.ext.get("billingzVersion") + "\"" } } compileOptions { @@ -65,7 +67,7 @@ android { jvmTarget = LibraryInfo.kotlinJvmTarget } buildFeatures { - viewBinding true + buildConfig true } lintOptions { // set to true to turn off analysis progress reporting by lint diff --git a/lib/google/src/main/java/com/zuko/billingz/google/store/client/GoogleClient.kt b/lib/google/src/main/java/com/zuko/billingz/google/store/client/GoogleClient.kt index 133b607..a1c191a 100644 --- a/lib/google/src/main/java/com/zuko/billingz/google/store/client/GoogleClient.kt +++ b/lib/google/src/main/java/com/zuko/billingz/google/store/client/GoogleClient.kt @@ -26,6 +26,7 @@ import com.android.billingclient.api.BillingResult import com.android.billingclient.api.PurchasesUpdatedListener import com.zuko.billingz.core.misc.Logger import com.zuko.billingz.core.store.client.Clientz +import com.zuko.billingz.google.BuildConfig import com.zuko.billingz.google.store.sales.GoogleResponse import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.MainScope @@ -67,7 +68,12 @@ class GoogleClient(private val purchasesUpdatedListener: PurchasesUpdatedListene context: Context?, connectionListener: Clientz.ConnectionListener ) { - Logger.v(TAG, "Initializing client...") + Logger.v( + TAG, "Initializing client..." + + "\n debug: ${BuildConfig.DEBUG}" + + "\n build: ${BuildConfig.BUILD_TYPE}" + + "\n version: ${BuildConfig.VERSION}" + ) this.connectionListener = connectionListener try { if (billingClient != null) {