diff --git a/PlayAssetDelivery/NativeSample/Teapot/build.gradle b/PlayAssetDelivery/NativeSample/Teapot/build.gradle index 0baeafe8..c018cc42 100644 --- a/PlayAssetDelivery/NativeSample/Teapot/build.gradle +++ b/PlayAssetDelivery/NativeSample/Teapot/build.gradle @@ -18,14 +18,14 @@ apply plugin: 'com.android.application' // Wrap the relative path with file() since CMake requires an absolute path. -def PLAY_CORE_NATIVE_SDK_DIR = file('../play-core-native-sdk') +// def PLAY_CORE_NATIVE_SDK_DIR = file('../play-core-native-sdk') android { - compileSdkVersion 28 + compileSdkVersion 34 defaultConfig { applicationId = 'com.google.android.samples.playassetdeliverynative' - minSdkVersion 16 + minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName "1.0.0" @@ -42,8 +42,8 @@ android { release { minifyEnabled false proguardFile getDefaultProguardFile('proguard-android-optimize.txt') - proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/asset_delivery.pgcfg" - proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/common.pgcfg" + //proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/asset_delivery.pgcfg" + //proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/common.pgcfg" } debug { minifyEnabled false @@ -55,6 +55,11 @@ android { } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + //All asset packs listed here will be included in the final AppBundle assetPacks = [":install_time_pack", ":on_demand_pack", ":fast_follow_pack"] @@ -64,7 +69,14 @@ android { } dependencies { + // This dependency is downloaded from the Google's Maven repository. + // So, make sure you also include that repository in your project's build.gradle file. + implementation 'com.google.android.play:asset-delivery:2.3.0' + + // For Kotlin users also add the Kotlin extensions library for Play Asset Delivery: + implementation 'com.google.android.play:asset-delivery-ktx:2.3.0' + implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation files("$PLAY_CORE_NATIVE_SDK_DIR/playcore.aar") + //implementation files("$PLAY_CORE_NATIVE_SDK_DIR/playcore.aar") } diff --git a/PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/PlayAssetDeliveryUtil.cpp b/PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/PlayAssetDeliveryUtil.cpp index 1687699e..7a41fbf1 100644 --- a/PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/PlayAssetDeliveryUtil.cpp +++ b/PlayAssetDelivery/NativeSample/Teapot/src/main/cpp/PlayAssetDeliveryUtil.cpp @@ -223,10 +223,10 @@ AssetPackDownloadStatus PrintDownloadState(struct android_app *app) { */ void ShowCellularDataConfirmation(struct android_app *app) { AssetPackErrorCode error_code1 = - AssetPackManager_showCellularDataConfirmation(app->activity->clazz); - ShowCellularDataConfirmationStatus status; + AssetPackManager_showConfirmationDialog(app->activity->clazz); + ShowConfirmationDialogStatus status; AssetPackErrorCode error_code2 = - AssetPackManager_getShowCellularDataConfirmationStatus(&status); + AssetPackManager_getShowConfirmationDialogStatus(&status); char log[1000] = ""; sprintf(log, "ShowCellularDataConfirmation, error_code=%d; Cellular data confirmation status=%d, error_code=%d", diff --git a/PlayAssetDelivery/NativeSample/build.gradle b/PlayAssetDelivery/NativeSample/build.gradle index 2e7a223a..d4689aa9 100755 --- a/PlayAssetDelivery/NativeSample/build.gradle +++ b/PlayAssetDelivery/NativeSample/build.gradle @@ -21,7 +21,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0-beta03' + classpath 'com.android.tools.build:gradle:4.0.2' } } diff --git a/PlayAssetDelivery/NativeSample/gradle/wrapper/gradle-wrapper.properties b/PlayAssetDelivery/NativeSample/gradle/wrapper/gradle-wrapper.properties index a2bf1313..ef9d8ff5 100644 --- a/PlayAssetDelivery/NativeSample/gradle/wrapper/gradle-wrapper.properties +++ b/PlayAssetDelivery/NativeSample/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Wed Jan 07 10:37:12 SGT 2026 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip