Skip to content

Commit

Permalink
Update initialization logs to display useful information such as buil…
Browse files Browse the repository at this point in the history
…d type and version
  • Loading branch information
rjsuzuki committed Jun 19, 2024
1 parent 8170183 commit 1a8cbf9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/amazon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
4 changes: 3 additions & 1 deletion lib/google/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 1a8cbf9

Please sign in to comment.