diff --git a/README.md b/README.md index 194363652..06781ce2a 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ Add the Firebase Messaging library and Android Support Library v4 as dependencie implementation "androidx.core:core:1.9.0" implementation "com.google.firebase:firebase-messaging:23.0.6" implementation "com.google.android.gms:play-services-ads:22.3.0" // Required only if you enable Google ADID collection in the SDK (turned off by default). - implementation "com.android.installreferrer:installreferrer:2.2" // Mandatory for v3.6.4 and above } ``` @@ -71,7 +70,7 @@ Also be sure to include the `google-services.json` classpath in your Project lev } dependencies { - classpath "com.android.tools.build:gradle:7.3.0" + classpath "com.android.tools.build:gradle:7.4.2" classpath "com.google.gms:google-services:4.3.3" // NOTE: Do not place your application dependencies here; they belong diff --git a/build.gradle b/build.gradle index 36d39b8e6..d2534a15a 100644 --- a/build.gradle +++ b/build.gradle @@ -10,19 +10,18 @@ buildscript { } dependencies { - classpath Libs.com_android_tools_build_gradle - classpath Libs.google_services// Google Services plugin - //classpath "com.github.dcendents:android-maven-gradle-plugin:$mavenPluginVersion" - classpath Libs.agcp// Huawei Push Plugin - classpath Libs.kotlin_gradle_plugin - classpath Libs.sonarqube_gradle_plugin - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' - classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0-RC1") - classpath('org.jacoco:org.jacoco.core:0.8.8') - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20' - + classpath(libs.firebase.gradle.crashlytics) + classpath(libs.detekt.gradle.plugin) + classpath(libs.android.gradle.plugin) + classpath(libs.kotlin.gradle.plugin) + classpath(libs.google.services) + classpath(libs.huawei.agcp.plugin) } } + +plugins { + alias(libs.plugins.sonarqube) +} allprojects { repositories { google() @@ -36,8 +35,6 @@ allprojects { } } -apply plugin: 'jacoco' -apply plugin: 'org.sonarqube' sonarqube { properties { property "sonar.projectKey", "CleverTap_clevertap-android-sdk" @@ -53,33 +50,33 @@ task clean(type: Delete) { task copyTemplates { def props = new Properties() - file("versions.properties").withInputStream { props.load(it) } outputs.upToDateWhen { false } - props.put("clevertap_android_sdk",Libs.clevertap_android_sdk.dropRight(1)) - props.put("clevertap_rendermax_sdk", Libs.clevertap_rendermax_sdk.dropRight(1)) - props.put("clevertap_geofence_sdk",Libs.clevertap_geofence_sdk.dropRight(1)) - props.put("clevertap_hms_sdk",Libs.clevertap_hms_sdk.dropRight(1)) - props.put("clevertap_xiaomi_sdk",Libs.clevertap_xiaomi_sdk.dropRight(1)) - props.put("push_templates",Libs.clevertap_push_templates_sdk.dropRight(1)) - props.put("play_services_location",Libs.play_services_location.dropRight(1)) - props.put("work_runtime",Libs.work_runtime.dropRight(1)) - props.put("concurrent_futures",Libs.concurrent_futures.dropRight(1)) - props.put("push",Libs.push.dropRight(1)) - props.put("appcompat",Libs.appcompat.dropRight(1)) - props.put("viewpager",Libs.viewpager.dropRight(1)) - props.put("material",Libs.material.dropRight(1)) - props.put("glide",Libs.glide.dropRight(1)) - props.put("recyclerview",Libs.recyclerview.dropRight(1)) - props.put("exoplayer",Libs.exoplayer.dropRight(1)) - props.put("exoplayer_ui",Libs.exoplayer_ui.dropRight(1)) - props.put("exoplayer_hls",Libs.exoplayer_hls.dropRight(1)) - props.put("installreferrer",Libs.installreferrer.dropRight(1)) - props.put("firebase_messaging",Libs.firebase_messaging.dropRight(1)) - props.put("androidx_core_core",Libs.androidx_core_core.dropRight(1)) - props.put("agcp",Libs.agcp.dropRight(1)) - props.put("com_android_tools_build_gradle",Libs.com_android_tools_build_gradle.dropRight(1)) - props.put("google_services",Libs.google_services.dropRight(1)) - props.put("play_services_ads",Libs.play_services_ads.dropRight(1)) + props.put("clevertap_android_sdk", libs.version.clevertap.android.sdk.get()) + props.put("clevertap_rendermax_sdk", libs.version.clevertap.rendermax.sdk.get()) + props.put("clevertap_geofence_sdk", libs.version.clevertap.geofence.sdk.get()) + props.put("clevertap_hms_sdk", libs.version.clevertap.hms.sdk.get()) + props.put("clevertap_xiaomi_sdk", libs.version.clevertap.xiaomi.sdk.get()) + props.put("push_templates", libs.version.clevertap.push.templates.sdk.get()) + props.put("play_services_location", libs.play.services.location.get()) + props.put("work_runtime", libs.androidx.work.runtime.get()) + props.put("concurrent_futures",libs.androidx.concurrent.futures.get()) + props.put("push", libs.huawei.push.get()) + props.put("appcompat", libs.androidx.appcompat.get()) + props.put("viewpager", libs.androidx.viewpager.get()) + props.put("material", libs.android.material.get()) + props.put("glide", libs.glide.get()) + props.put("recyclerview", libs.androidx.recyclerview.get()) + props.put("exoplayer", libs.exoplayer.exoplayer.get()) + props.put("exoplayer_ui", libs.exoplayer.ui.get()) + props.put("exoplayer_hls", libs.exoplayer.hls.get()) + props.put("installreferrer", libs.installreferrer.get()) + props.put("firebase_messaging", libs.firebase.messaging.get()) + props.put("androidx_core_core", libs.androidx.core.core.get()) + props.put("agcp", libs.huawei.agcp.plugin.get()) + props.put("com_android_tools_build_gradle", libs.android.gradle.plugin.get()) + props.put("google_services", libs.google.services.get()) + props.put("play_services_ads", libs.play.services.ads.get()) + props.put("clevertap_android_sdk_version", libs.versions.clevertap.android.sdk.get()) doLast{ copy { diff --git a/buildSrc/.gitignore b/buildSrc/.gitignore deleted file mode 100644 index 192221b47..000000000 --- a/buildSrc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.gradle/ -build/ \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts deleted file mode 100644 index 0bc648632..000000000 --- a/buildSrc/build.gradle.kts +++ /dev/null @@ -1,8 +0,0 @@ -repositories { - google() - mavenCentral() -} -plugins { - `kotlin-dsl` -} - diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts deleted file mode 100644 index 824ede0a8..000000000 --- a/buildSrc/settings.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - plugins { - id("de.fayard.refreshVersions") version "0.10.0" -//// # available:"0.10.1" -//// # available:"0.11.0" -//// # available:"0.20.0" -//// # available:"0.21.0" -//// # available:"0.22.0" -//// # available:"0.23.0" -//// # available:"0.30.0" -//// # available:"0.30.1" -//// # available:"0.30.2" -//// # available:"0.40.0" -//// # available:"0.40.1" -//// # available:"0.40.2" -//// # available:"0.50.0" -//// # available:"0.50.1" -//// # available:"0.50.2" - } -} - -plugins { - id("de.fayard.refreshVersions") -} - diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt deleted file mode 100644 index f3a186d65..000000000 --- a/buildSrc/src/main/kotlin/Libs.kt +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Generated by - * $ ./gradlew buildSrcLibs - * Re-run when you add a new dependency to the build - * - * Find which updates are available by running - * $ ./gradlew refreshVersions - * And edit the file `versions.properties` - * - * See https://github.com/jmfayard/refreshVersions - */ -object Libs { - - const val androidx_annotation: String = "androidx.annotation:annotation:_" - - const val appcompat: String = "androidx.appcompat:appcompat:_" - - const val concurrent_futures: String = "androidx.concurrent:concurrent-futures:_" - - const val constraintlayout: String = "androidx.constraintlayout:constraintlayout:_" - - const val coordinatorlayout: String = "androidx.coordinatorlayout:coordinatorlayout:_" - - const val androidx_core_core: String = "androidx.core:core:_" - - const val core_ktx: String = "androidx.core:core-ktx:_" - - const val databinding_adapters: String = "androidx.databinding:databinding-adapters:_" - - const val databinding_common: String = "androidx.databinding:databinding-common:_" - - const val databinding_compiler: String = "androidx.databinding:databinding-compiler:_" - - const val databinding_runtime: String = "androidx.databinding:databinding-runtime:_" - - const val fragment: String = "androidx.fragment:fragment:_" - - const val fragment_ktx: String = "androidx.fragment:fragment-ktx:_" - - const val lifecycle_livedata_ktx: String = "androidx.lifecycle:lifecycle-livedata-ktx:_" - - const val lifecycle_viewmodel_ktx: String = "androidx.lifecycle:lifecycle-viewmodel-ktx:_" - - const val multidex: String = "androidx.multidex:multidex:_" - - const val multidex_instrumentation: String = "androidx.multidex:multidex-instrumentation:_" - - const val recyclerview: String = "androidx.recyclerview:recyclerview:_" - - const val espresso_core: String = "androidx.test.espresso:espresso-core:_" - - const val androidx_test_ext_junit: String = "androidx.test.ext:junit:_" - - const val androidx_test_core: String = "androidx.test:core:_" - - const val androidx_test_rules: String = "androidx.test:rules:_" - - const val androidx_test_runner: String = "androidx.test:runner:_" - - const val viewpager: String = "androidx.viewpager:viewpager:_" - - const val work_runtime: String = "androidx.work:work-runtime:_" - - const val work_testing: String = "androidx.work:work-testing:_" - - const val installreferrer: String = "com.android.installreferrer:installreferrer:_" - - const val com_android_tools_build_gradle: String = "com.android.tools.build:gradle:_" - - const val lint_api: String = "com.android.tools.lint:lint-api:_" - - const val lint_checks: String = "com.android.tools.lint:lint-checks:_" - - const val lint_gradle: String = "com.android.tools.lint:lint-gradle:_" - - const val clevertap_android_sdk: String = "com.clevertap.android:clevertap-android-sdk:_" - - const val clevertap_rendermax_sdk: String = "com.clevertap.android:clevertap-rendermax-sdk:_" - - const val clevertap_geofence_sdk: String = "com.clevertap.android:clevertap-geofence-sdk:_" - - const val clevertap_hms_sdk: String = "com.clevertap.android:clevertap-hms-sdk:_" - - const val clevertap_xiaomi_sdk: String = "com.clevertap.android:clevertap-xiaomi-sdk:_" - - const val clevertap_push_templates_sdk: String = "com.clevertap.android:push-templates:_" - - const val glide: String = "com.github.bumptech.glide:glide:_" - - const val exoplayer: String = "com.google.android.exoplayer:exoplayer:_" - - const val exoplayer_hls: String = "com.google.android.exoplayer:exoplayer-hls:_" - - const val exoplayer_ui: String = "com.google.android.exoplayer:exoplayer-ui:_" - - const val play_services_ads: String = "com.google.android.gms:play-services-ads:_" - - const val play_services_location: String = "com.google.android.gms:play-services-location:_" - - const val material: String = "com.google.android.material:material:_" - - const val gson: String = "com.google.code.gson:gson:_" - - const val firebase_messaging: String = "com.google.firebase:firebase-messaging:_" - - const val google_services: String = "com.google.gms:google-services:_" - - const val truth: String = "com.google.truth:truth:_" - - const val agcp: String = "com.huawei.agconnect:agcp:_" - - const val push: String = "com.huawei.hms:push:_" - - const val de_fayard_buildsrclibs_gradle_plugin: String = - "de.fayard.buildSrcLibs:de.fayard.buildSrcLibs.gradle.plugin:_" - - const val catch_exception: String = "eu.codearte.catch-exception:catch-exception:_" - - const val junit_junit: String = "junit:junit:_" - - const val awaitility: String = "org.awaitility:awaitility:_" - - const val org_jacoco_agent: String = "org.jacoco:org.jacoco.agent:_" - - const val org_jacoco_ant: String = "org.jacoco:org.jacoco.ant:_" - - const val org_jacoco_core: String = "org.jacoco:org.jacoco.core:_" - - const val kotlin_annotation_processing_gradle: String = - "org.jetbrains.kotlin:kotlin-annotation-processing-gradle:_" - - const val kotlin_gradle_plugin: String = "org.jetbrains.kotlin:kotlin-gradle-plugin:_" - - const val kotlin_scripting_compiler_embeddable: String = - "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:_" - - const val kotlin_stdlib_jdk7: String = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:_" - - const val kotlin_stdlib_jdk8: String = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:_" - - const val kotlin_test: String = "org.jetbrains.kotlin:kotlin-test:_" - - const val junit_jupiter_api: String = "org.junit.jupiter:junit-jupiter-api:_" - - const val junit_jupiter_engine: String = "org.junit.jupiter:junit-jupiter-engine:_" - - const val junit_platform_runner: String = "org.junit.platform:junit-platform-runner:_" - - const val mockito_core: String = "org.mockito:mockito-core:_" - - const val mockito_inline: String = "org.mockito:mockito-inline:_" - - const val opentest4j: String = "org.opentest4j:opentest4j:_" - - const val powermock_api_mockito2: String = "org.powermock:powermock-api-mockito2:_" - - const val powermock_classloading_xstream: String = - "org.powermock:powermock-classloading-xstream:_" - - const val powermock_core: String = "org.powermock:powermock-core:_" - - const val powermock_module_junit4: String = "org.powermock:powermock-module-junit4:_" - - const val powermock_module_junit4_rule: String = "org.powermock:powermock-module-junit4-rule:_" - - const val robolectric: String = "org.robolectric:robolectric:_" - - const val jsonassert: String = "org.skyscreamer:jsonassert:_" - - const val sonarqube_gradle_plugin: String = - "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:_" - - const val xmlpull: String = "xmlpull:xmlpull:_" - - const val kotlin_stblib: String = "org.jetbrains.kotlin:kotlin-stdlib:_" - -} - -object Android { - - // Android SDK - const val compileSdkVersionVal = 33 - const val targetSdkVersionVal = 33 - const val buildToolsVersionVal = "33.0.0" - const val minSdkVersionVal = 19 -} - -object SDKTest { - - const val jacocoToolVersion = "0.8.4" -} diff --git a/clevertap-core/build.gradle b/clevertap-core/build.gradle index a6397e001..9d31a6246 100644 --- a/clevertap-core/build.gradle +++ b/clevertap-core/build.gradle @@ -1,15 +1,14 @@ -import static de.fayard.refreshVersions.core.Versions.versionFor ext { libraryName = 'CleverTapAndroidSDK' artifact = 'clevertap-android-sdk' libraryDescription = 'The CleverTap Android SDK' - libraryVersion = versionFor("version.com.clevertap.android..clevertap-android-sdk") + libraryVersion = libs.versions.clevertap.android.sdk.get() licenseName = 'The Apache Software License, Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' allLicenses = ["Apache-2.0"] - minSdkVersionVal = Android.minSdkVersionVal + minSdkVersionVal = libs.versions.android.minSdk.get().toInteger() } apply from: "../gradle-scripts/commons.gradle" @@ -19,38 +18,40 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } } dependencies { - compileOnly Libs.firebase_messaging - compileOnly Libs.exoplayer - compileOnly Libs.exoplayer_hls - compileOnly Libs.exoplayer_ui - compileOnly Libs.glide + compileOnly(libs.firebase.messaging) + compileOnly(libs.bundles.exoplayer) + compileOnly(libs.glide) //for notification - compileOnly Libs.androidx_core_core - compileOnly Libs.viewpager - implementation Libs.appcompat - implementation Libs.recyclerview - compileOnly Libs.material - compileOnly Libs.fragment - implementation Libs.installreferrer - - implementation Libs.work_runtime + compileOnly(libs.androidx.core.core) + compileOnly(libs.androidx.viewpager) + compileOnly(libs.android.material) + compileOnly(libs.androidx.fragment) + + implementation(libs.androidx.appcompat) + implementation(libs.androidx.recyclerview) + implementation(libs.installreferrer) + implementation(libs.androidx.work.runtime) + // Unit testing dependencies - testImplementation project(':test_shared') - testImplementation Libs.firebase_messaging - testImplementation "io.mockk:mockk:1.13.5" + testImplementation(project(":test_shared")) + testImplementation(libs.firebase.messaging) + testImplementation(libs.test.mockk) - androidTestImplementation "androidx.work:work-testing:2.7.1" - androidTestImplementation "androidx.test:runner:1.5.2" - androidTestImplementation "androidx.test:rules:1.5.0" + androidTestImplementation(libs.test.work.testing) + androidTestImplementation(libs.test.runner) + androidTestImplementation(libs.test.rules) // Optional -- UI testing with Espresso - androidTestImplementation Libs.espresso_core + androidTestImplementation(libs.test.espresso.core) // Optional -- UI testing with UI Automator - androidTestImplementation "androidx.test.uiautomator:uiautomator:2.3.0-alpha03" + androidTestImplementation(libs.test.uiautomator) // Optional -- UI testing with Compose - androidTestImplementation Libs.androidx_test_ext_junit + androidTestImplementation(libs.test.ext.junit) } sonarqube { diff --git a/clevertap-geofence/build.gradle b/clevertap-geofence/build.gradle index f8567a3e4..f782531d3 100644 --- a/clevertap-geofence/build.gradle +++ b/clevertap-geofence/build.gradle @@ -1,57 +1,53 @@ -import static de.fayard.refreshVersions.core.Versions.versionFor ext { libraryName = 'GeofenceSDK' artifact = 'clevertap-geofence-sdk' libraryDescription = 'The CleverTap Android Geofence SDK' - libraryVersion = versionFor("version.com.clevertap.android..clevertap-geofence-sdk") + libraryVersion = libs.versions.clevertap.geofence.sdk.get() licenseName = 'MIT License' licenseUrl = 'https://opensource.org/licenses/MIT' allLicenses = ["MIT"] - minSdkVersionVal = Android.minSdkVersionVal + minSdkVersionVal = libs.versions.android.minSdk.get().toInteger() } apply from: "../gradle-scripts/commons.gradle" dependencies { - compileOnly project(':clevertap-core') - compileOnly Libs.play_services_location - compileOnly Libs.work_runtime - compileOnly Libs.concurrent_futures + compileOnly (project(":clevertap-core")) + compileOnly (libs.play.services.location) + compileOnly (libs.androidx.work.runtime) + compileOnly (libs.androidx.concurrent.futures) - // Unit testing dependencies - testImplementation Libs.junit_platform_runner - testImplementation Libs.junit_jupiter_api - testRuntimeOnly Libs.junit_jupiter_engine - - testImplementation Libs.mockito_core - testImplementation Libs.robolectric + testRuntimeOnly (libs.test.junit.jupiter.engine) - testImplementation Libs.androidx_test_core - testImplementation Libs.androidx_test_ext_junit - testImplementation Libs.appcompat - testImplementation Libs.firebase_messaging + // Unit testing dependencies + testImplementation (libs.test.junit.platform.runner) + testImplementation (libs.test.junit.jupiter.api) + + testImplementation (libs.test.mockito.core) + testImplementation (libs.test.robolectric) + + testImplementation (libs.test.core) + testImplementation (libs.test.ext.junit) + testImplementation (libs.androidx.appcompat) + testImplementation (libs.firebase.messaging) + + testImplementation (libs.bundles.powermock) + testImplementation (libs.catch.exception) + testImplementation (project(":clevertap-core")) + + testImplementation (libs.installreferrer) + testImplementation (libs.play.services.location) + testImplementation (libs.test.jsonassert) + testImplementation (libs.test.work.testing) + testImplementation (libs.test.awaitility) + testImplementation (libs.androidx.concurrent.futures) + testImplementation (libs.androidx.core.ktx) + testImplementation (libs.kotlin.stdlib.jdk7) // AndroidJUnitRunner and JUnit Rules - androidTestImplementation Libs.androidx_test_runner - androidTestImplementation Libs.androidx_test_rules - androidTestImplementation Libs.espresso_core - - testImplementation Libs.powermock_core - testImplementation Libs.powermock_module_junit4 - testImplementation Libs.powermock_module_junit4_rule - testImplementation Libs.powermock_api_mockito2 - testImplementation Libs.powermock_classloading_xstream - testImplementation Libs.catch_exception - testImplementation project(':clevertap-core') - - testImplementation Libs.installreferrer - testImplementation Libs.play_services_location - testImplementation Libs.jsonassert - testImplementation Libs.work_testing - testImplementation Libs.awaitility - testImplementation Libs.concurrent_futures - testImplementation Libs.core_ktx - testImplementation Libs.kotlin_stdlib_jdk7 + androidTestImplementation (libs.test.runner) + androidTestImplementation (libs.test.rules) + androidTestImplementation (libs.test.espresso.core) } \ No newline at end of file diff --git a/clevertap-hms/build.gradle b/clevertap-hms/build.gradle index 3fa38879f..3d24de644 100644 --- a/clevertap-hms/build.gradle +++ b/clevertap-hms/build.gradle @@ -1,27 +1,28 @@ -import static de.fayard.refreshVersions.core.Versions.versionFor -apply plugin: 'com.huawei.agconnect' +plugins { + id("com.huawei.agconnect") +} ext { libraryName = 'HuaweiPushSDK' artifact = 'clevertap-hms-sdk' libraryDescription = 'The CleverTap Android Huawei Push SDK' - libraryVersion = versionFor("version.com.clevertap.android..clevertap-hms-sdk") + libraryVersion = libs.versions.clevertap.hms.sdk.get() licenseName = 'MIT License' licenseUrl = 'https://opensource.org/licenses/MIT' allLicenses = ["MIT"] - minSdkVersionVal = Android.minSdkVersionVal + minSdkVersionVal = libs.versions.android.minSdk.get().toInteger() } apply from: "../gradle-scripts/commons.gradle" dependencies { compileOnly project(':clevertap-core') - implementation Libs.push - compileOnly Libs.androidx_annotation + implementation (libs.huawei.push) + compileOnly (libs.androidx.annotation) testImplementation project(':test_shared') - testImplementation Libs.push + testImplementation (libs.huawei.push) } \ No newline at end of file diff --git a/clevertap-pushtemplates/build.gradle b/clevertap-pushtemplates/build.gradle index 9b3ec544c..0a24f67ba 100644 --- a/clevertap-pushtemplates/build.gradle +++ b/clevertap-pushtemplates/build.gradle @@ -1,16 +1,14 @@ -import static de.fayard.refreshVersions.core.Versions.versionFor - ext { libraryName = 'PushTemplates' artifact = 'push-templates' libraryDescription = 'The CleverTap Android Push Templates SDK' - libraryVersion = versionFor("version.com.clevertap.android..push-templates") + libraryVersion = libs.versions.clevertap.push.templates.sdk.get() licenseName = 'MIT License' licenseUrl = 'https://opensource.org/licenses/MIT' allLicenses = ["MIT"] - minSdkVersionVal = Android.minSdkVersionVal + minSdkVersionVal = libs.versions.android.minSdk.get().toInteger() } apply from: "../gradle-scripts/commons.gradle" @@ -27,12 +25,13 @@ android { dependencies { compileOnly project(':clevertap-core') - implementation Libs.core_ktx - implementation Libs.appcompat - compileOnly Libs.material + compileOnly (libs.android.material) + + implementation (libs.androidx.core.ktx) + implementation (libs.androidx.appcompat) + testImplementation (libs.test.junit) - testImplementation Libs.junit_junit - androidTestImplementation Libs.androidx_test_ext_junit - androidTestImplementation Libs.espresso_core + androidTestImplementation (libs.test.ext.junit) + androidTestImplementation (libs.test.espresso.core) } \ No newline at end of file diff --git a/clevertap-xps/build.gradle b/clevertap-xps/build.gradle index d9bad3092..974f91b50 100644 --- a/clevertap-xps/build.gradle +++ b/clevertap-xps/build.gradle @@ -1,15 +1,14 @@ -import static de.fayard.refreshVersions.core.Versions.versionFor ext { libraryName = 'XiaomiPushSDK' artifact = 'clevertap-xiaomi-sdk' libraryDescription = 'The CleverTap Android Xiaomi Push SDK' - libraryVersion = versionFor("version.com.clevertap.android..clevertap-xiaomi-sdk") + libraryVersion = libs.versions.clevertap.xiaomi.sdk.get() licenseName = 'MIT License' licenseUrl = 'https://opensource.org/licenses/MIT' allLicenses = ["MIT"] - minSdkVersionVal = Android.minSdkVersionVal + minSdkVersionVal = libs.versions.android.minSdk.get().toInteger() } apply from: "../gradle-scripts/commons.gradle" @@ -26,7 +25,7 @@ dependencies { compileOnly fileTree(include: ["*.jar", "*.aar"], dir: "libs") compileOnly project(':clevertap-core') - compileOnly Libs.androidx_annotation + compileOnly (libs.androidx.annotation) testImplementation project(':test_shared') testImplementation fileTree('libs') } \ No newline at end of file diff --git a/docs/CTPUSHTEMPLATES.md b/docs/CTPUSHTEMPLATES.md index 8409eefd7..5a1009bb4 100644 --- a/docs/CTPUSHTEMPLATES.md +++ b/docs/CTPUSHTEMPLATES.md @@ -20,7 +20,7 @@ CleverTap Push Templates SDK helps you engage with your users using fancy push n 1. Add the dependencies to the `build.gradle` ```groovy -implementation "com.clevertap.android:push-templates:1.1.0" +implementation "com.clevertap.android:push-templates:1.2.0" implementation "com.clevertap.android:clevertap-android-sdk:5.2.1" // 4.4.0 and above ``` diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index 713c66dff..db3b89a64 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -705,14 +705,6 @@ Please note if using Google Ad Id for apps targeting Android 13+, will have to d ``` -#### Tracking the Install Referrer - -From CleverTap SDK v3.6.4 onwards, just remove the above the Broadcast Receiver if you are using it and add the following gradle dependency to capture UTM details, app install time, referrer click time and other metrics provided by the Google Install Referrer Library. - -```groovy - implementation "com.android.installreferrer:installreferrer:2.2" -``` - #### Remote Config Variables From CleverTap SDK v5.0.0 onwards, you can use Remote Config Variables in your app. Please refer to the [Remote Config Variables doc](Variables.md) to read more on how to integrate this to your app. diff --git a/gradle-scripts/commons.gradle b/gradle-scripts/commons.gradle index 483d5cde3..d6bc660c6 100644 --- a/gradle-scripts/commons.gradle +++ b/gradle-scripts/commons.gradle @@ -1,9 +1,10 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -//apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'maven-publish' apply plugin: 'signing' apply from: "${project.rootDir}/gradle-scripts/jacoco_root.gradle" +apply from: "${project.rootDir}/gradle-scripts/checkstyle.gradle" +apply from: "${project.rootDir}/gradle-scripts/detekt.gradle" ext { Repo = 'Maven' @@ -30,12 +31,12 @@ group = publishedGroupId def (major,minor,patch) = libraryVersion.split("\\.") android { - compileSdkVersion Android.compileSdkVersionVal - buildToolsVersion Android.buildToolsVersionVal + compileSdkVersion libs.versions.android.compileSdk.get().toInteger() + buildToolsVersion libs.versions.android.buildTools.get() defaultConfig { - minSdkVersion minSdkVersionVal - targetSdkVersion Android.targetSdkVersionVal + minSdkVersion libs.versions.android.minSdk.get().toInteger() + targetSdkVersion libs.versions.android.targetSdk.get().toInteger() versionCode "${major}0${minor}0${patch}".toInteger() versionName libraryVersion @@ -182,6 +183,4 @@ afterEvaluate { signing { sign publishing.publications -} -apply from: "${project.rootDir}/gradle-scripts/checkstyle.gradle" -apply from: "${project.rootDir}/gradle-scripts/detekt.gradle" \ No newline at end of file +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..f96d52efa --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,197 @@ +[versions] +# Project +android_compileSdk = "33" +android_gradle_plugin = "7.4.2" +android_minSdk = "19" +android_targetSdk = "33" +kotlin_plugin = "1.7.20" +sonarqube_plugin = "3.3" +android_buildTools = "33.0.0" +detekt_gradle_plugin = "1.20.0-RC1" +firebase_gradle_crashlytics = "2.8.1" + +# AndroidX +annotation = "1.2.0" +appcompat = "1.6.0-rc01" +concurrent_futures = "1.1.0" +constraint_layout = "2.0.1" +coordinator_layout = "1.1.0" +core = "1.9.0" +core_ktx = "1.9.0" +fragment = "1.3.6" +recyclerview = "1.2.1" +viewpager = "1.0.0" +work_runtime = "2.7.1" + +#UI +material = "1.4.0" + +#Test +espresso_core = "3.3.0" +test_ext_junit = "1.1.3" +test_core = "1.4.0" +test_rules = "1.5.0" +test_runner = "1.5.2" +work_testing = "2.7.1" +truth = "1.1.3" +junit = "4.13" +awaitility = "4.1.0" +kotlin_stdlib_jdk7 = "1.7.20" #check with kotlin_gradle_plugin +kotlin_test = "1.7.20" #check with kotlin_gradle_plugin +junit_jupiter_api = "5.7.2" +junit_jupiter_engine = "5.7.2" +junit_platform_runner = "1.7.2" +mockito_core = "3.5.11" +opentest4j = "1.2.0" +powermock_api_mockito2 = "2.0.9" +powermock_classloading_xstream = "2.0.9" +powermock_core = "2.0.9" +powermock_module_junit4 = "2.0.9" +powermock_module_junit4_rule = "2.0.9" +robolectric = "4.7.3" +jsonassert = "1.5.0" +xmlpull = "1.1.3.1" +mockk = "1.13.5" +uiautomator = "2.3.0-alpha03" + +#Install Referrer +installreferrer = "2.2" + +#SDK Versions +clevertap_android_sdk = "5.2.1" +clevertap_rendermax_sdk = "1.0.3" +clevertap_geofence_sdk = "1.2.0" +clevertap_hms_sdk = "1.3.3" +clevertap_xiaomi_sdk = "1.5.4" +clevertap_push_templates_sdk = "1.2.0" + +# Glide +glide = "4.12.0" + +# Exoplayer +exoplayer = "2.17.1" +exoplayer_hls = "2.17.1" +exoplayer_ui = "2.17.1" + +#Play Services +play_services_ads = "22.3.0" +play_services_location = "21.0.0" + +#Gson +gson = "2.8.6" + +#FCM +firebase_messaging = "23.0.6" + +#GMS +google_services = "4.3.3" + +#HMS Push Plugin/Lib +agcp = "1.9.0.300" +push = "6.11.0.300" + +#Catch Exception +catch_exception = "2.0" + + +[libraries] +# Project +android_gradle_plugin = { module = "com.android.tools.build:gradle", version.ref = "android_gradle_plugin" } +kotlin_gradle_plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin_plugin" } +detekt_gradle_plugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin" , version.ref= "detekt_gradle_plugin"} +firebase_gradle_crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle" , version.ref= "firebase_gradle_crashlytics"} + +# AndroidX +androidx_annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" } +androidx_appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +androidx_concurrent_futures = { module = "androidx.concurrent:concurrent-futures", version.ref = "concurrent_futures" } +androidx_constraint_layout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraint_layout" } +androidx_coordinator_layout = { module = "androidx.coordinatorlayout:coordinatorlayout", version.ref = "coordinator_layout" } +androidx_core_core = { module = "androidx.core:core", version.ref = "core" } +androidx_core_ktx = { module = "androidx.core:core-ktx", version.ref = "core_ktx" } +androidx_fragment = { module = "androidx.fragment:fragment", version.ref = "fragment" } +androidx_recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } +androidx_viewpager = { module = "androidx.viewpager:viewpager", version.ref = "viewpager" } +androidx_work_runtime = { module = "androidx.work:work-runtime", version.ref = "work_runtime" } + +#UI +android_material = { module = "com.google.android.material:material", version.ref = "material" } + + +# Test +test_espresso_core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso_core" } +test_ext_junit = { module = "androidx.test.ext:junit", version.ref = "test_ext_junit" } +test_core = { module = "androidx.test:core", version.ref = "test_core" } +test_rules = { module = "androidx.test:rules", version.ref = "test_rules" } +test_runner = { module = "androidx.test:runner", version.ref = "test_runner" } +test_work_testing = { module = "androidx.work:work-testing", version.ref = "work_testing" } +test_truth = { module = "com.google.truth:truth", version.ref = "truth" } +test_junit = { module = "junit:junit", version.ref = "junit" } +test_awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" } +test_kotlin_test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin_test" } +test_junit_jupiter_api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit_jupiter_api" } +test_junit_jupiter_engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit_jupiter_engine" } +test_junit_platform_runner = { module = "org.junit.platform:junit-platform-runner", version.ref = "junit_platform_runner" } +test_mockito_core = { module = "org.mockito:mockito-core", version.ref = "mockito_core" } +test_mockito_inline = { module = "org.mockito:mockito-inline", version.ref = "mockito_core" } +test_opentest4j = { module = "org.opentest4j:opentest4j", version.ref = "opentest4j" } +test_powermock_api_mockito2 = { module = "org.powermock:powermock-api-mockito2", version.ref = "powermock_api_mockito2" } +test_powermock_classloading_xstream = { module = "org.powermock:powermock-classloading-xstream", version.ref = "powermock_classloading_xstream" } +test_powermock_core = { module = "org.powermock:powermock-core", version.ref = "powermock_core" } +test_powermock_module_junit4 = { module = "org.powermock:powermock-module-junit4", version.ref = "powermock_module_junit4" } +test_powermock_module_junit4_rule = { module = "org.powermock:powermock-module-junit4-rule", version.ref = "powermock_module_junit4_rule" } +test_robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } +test_jsonassert = { module = "org.skyscreamer:jsonassert", version.ref = "jsonassert" } +test_xmlpull = { module = "xmlpull:xmlpull", version.ref = "xmlpull" } +test_mockk = { module = "io.mockk:mockk", version.ref="mockk"} +test_uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref="uiautomator"} + +#Kotlin Stdlib +kotlin_stdlib_jdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin_stdlib_jdk7" } + +#Install Referrer +installreferrer = { module = "com.android.installreferrer:installreferrer", version.ref = "installreferrer" } + +#SDK Versions +version_clevertap_android_sdk = { module = "com.clevertap.android:clevertap-android-sdk", version.ref = "clevertap_android_sdk" } +version_clevertap_rendermax_sdk = { module = "com.clevertap.android:clevertap-rendermax-sdk", version.ref = "clevertap_rendermax_sdk" } +version_clevertap_geofence_sdk = { module = "com.clevertap.android:clevertap-geofence-sdk", version.ref = "clevertap_geofence_sdk" } +version_clevertap_hms_sdk = { module = "com.clevertap.android:clevertap-hms-sdk", version.ref = "clevertap_hms_sdk" } +version_clevertap_xiaomi_sdk = { module = "com.clevertap.android:clevertap-xiaomi-sdk", version.ref = "clevertap_xiaomi_sdk" } +version_clevertap_push_templates_sdk = { module = "com.clevertap.android:push-templates", version.ref = "clevertap_push_templates_sdk" } + +# Glide +glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } + +#Exoplayer +exoplayer_exoplayer = { module = "com.google.android.exoplayer:exoplayer", version.ref = "exoplayer" } +exoplayer_hls = { module = "com.google.android.exoplayer:exoplayer-hls", version.ref = "exoplayer_hls" } +exoplayer_ui = { module = "com.google.android.exoplayer:exoplayer-ui", version.ref = "exoplayer_ui" } + +#Play Services +play_services_ads = { module = "com.google.android.gms:play-services-ads", version.ref = "play_services_ads" } +play_services_location = { module = "com.google.android.gms:play-services-location", version.ref = "play_services_location" } + +#Gson +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } + +#FCM +firebase_messaging = { module = "com.google.firebase:firebase-messaging", version.ref = "firebase_messaging" } + +#GMS +google_services = { module = "com.google.gms:google-services", version.ref = "google_services" } + +#HMS Push Plugin/Lib +huawei_agcp_plugin = { module = "com.huawei.agconnect:agcp", version.ref = "agcp" } +huawei_push = { module = "com.huawei.hms:push", version.ref = "push" } + +#Catch Exception +catch_exception = { module = "eu.codearte.catch-exception:catch-exception", version.ref = "catch_exception" } + +[bundles] +exoplayer = ["exoplayer_exoplayer", "exoplayer_hls", "exoplayer_ui"] +powermock = ["test_powermock_api_mockito2", "test_powermock_classloading_xstream", "test_powermock_core", "test_powermock_module_junit4", "test_powermock_module_junit4_rule"] +mockito = ["test_mockito_core", "test_mockito_inline"] + +[plugins] +sonarqube = { id="org.sonarqube", version.ref = "sonarqube_plugin" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 48f9756ca..63823cb76 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Oct 18 14:46:26 IST 2022 +#Thu May 18 16:22:56 IST 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index 3804eaa49..c7f70fa19 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,35 +1,5 @@ plugins { - id 'de.fayard.refreshVersions' version '0.10.0' -//// # available:'0.10.1' -//// # available:'0.11.0' -//// # available:'0.20.0' -//// # available:'0.21.0' -//// # available:'0.22.0' -//// # available:'0.23.0' -//// # available:'0.30.0' -//// # available:'0.30.1' -//// # available:'0.30.2' -//// # available:'0.40.0' -//// # available:'0.40.1' -//// # available:'0.40.2' -//// # available:'0.50.0' -//// # available:'0.50.1' -//// # available:'0.50.2' id "com.gradle.enterprise" version "3.6.3" -//// # available:"3.6.4" -//// # available:"3.7" -//// # available:"3.7.1" -//// # available:"3.7.2" -//// # available:"3.8" -//// # available:"3.8.1" -//// # available:"3.9" -//// # available:"3.10" -//// # available:"3.10.1" -//// # available:"3.10.2" -//// # available:"3.10.3" -//// # available:"3.11" -//// # available:"3.11.1" -//// # available:"3.11.2" } include ':test_shared' include ':clevertap-core' @@ -39,10 +9,6 @@ include ':clevertap-xps' include ':clevertap-hms' include ':clevertap-pushtemplates' -refreshVersions { - enableBuildSrcLibs() -} - gradleEnterprise { buildScan { termsOfServiceUrl = "https://gradle.com/terms-of-service" diff --git a/templates/CTGEOFENCE.md b/templates/CTGEOFENCE.md index 59b24d7ad..cdf64cd37 100644 --- a/templates/CTGEOFENCE.md +++ b/templates/CTGEOFENCE.md @@ -16,11 +16,11 @@ CleverTap Android Geofence SDK provides **Geofencing capabilities** to CleverTap Add the following dependencies to the `build.gradle` ```Groovy -implementation "${ext.clevertap_geofence_sdk}${ext['version.com.clevertap.android..clevertap-geofence-sdk']}" -implementation "${ext.clevertap_android_sdk}${ext['version.com.clevertap.android..clevertap-android-sdk']}" // 3.9.0 and above -implementation "${ext.play_services_location}${ext['version.google.android.play-services-location']}" -implementation "${ext.work_runtime}${ext['version.androidx.work']}" // required for FETCH_LAST_LOCATION_PERIODIC -implementation "${ext.concurrent_futures}${ext['version.androidx.concurrent']}" // required for FETCH_LAST_LOCATION_PERIODIC +implementation "${ext.clevertap_geofence_sdk}" +implementation "${ext.clevertap_android_sdk}" // 3.9.0 and above +implementation "${ext.play_services_location}" +implementation "${ext.work_runtime}" // required for FETCH_LAST_LOCATION_PERIODIC +implementation "${ext.concurrent_futures}" // required for FETCH_LAST_LOCATION_PERIODIC ``` ## 🔒 Permissions [(Back to top)](#-table-of-contents) diff --git a/templates/CTHUAWEIPUSH.md b/templates/CTHUAWEIPUSH.md index b7037ed1f..18b921f46 100644 --- a/templates/CTHUAWEIPUSH.md +++ b/templates/CTHUAWEIPUSH.md @@ -37,7 +37,7 @@ buildscript { } dependencies { // FOR HUAWEI ADD THIS - classpath "${ext.agcp}${ext['version.com.huawei.agconnect..agcp']}" + classpath "${ext.agcp}" } } @@ -52,8 +52,8 @@ allprojects { * Add the following to your app’s `build.gradle` file ```groovy -implementation "${ext.clevertap_hms_sdk}${ext['version.com.clevertap.android..clevertap-hms-sdk']}" -implementation "${ext.push}${ext['version.com.huawei.hms..push']}" +implementation "${ext.clevertap_hms_sdk}" +implementation "${ext.push}" //At the bottom of the file add this apply plugin: 'com.huawei.agconnect' diff --git a/templates/CTPUSHTEMPLATES.md b/templates/CTPUSHTEMPLATES.md index 7e47fd4cb..e77c7bc58 100644 --- a/templates/CTPUSHTEMPLATES.md +++ b/templates/CTPUSHTEMPLATES.md @@ -20,8 +20,8 @@ CleverTap Push Templates SDK helps you engage with your users using fancy push n 1. Add the dependencies to the `build.gradle` ```groovy -implementation "${ext.push_templates}${ext['version.com.clevertap.android..push-templates']}" -implementation "${ext.clevertap_android_sdk}${ext['version.com.clevertap.android..clevertap-android-sdk']}" // 4.4.0 and above +implementation "${ext.push_templates}" +implementation "${ext.clevertap_android_sdk}" // 4.4.0 and above ``` 2. Add the following line to your Application class before the `onCreate()` diff --git a/templates/CTRENDERMAX.md b/templates/CTRENDERMAX.md index b2c2b43d5..c18cb69c6 100644 --- a/templates/CTRENDERMAX.md +++ b/templates/CTRENDERMAX.md @@ -21,7 +21,7 @@ To use CleverTap's RenderMax SDK with your app, add the following code snippet i ```groovy dependencies { - implementation "${ext.clevertap_rendermax_sdk}${ext['version.com.clevertap.android..clevertap-rendermax-sdk']}" + implementation "${ext.clevertap_rendermax_sdk}" } ``` diff --git a/templates/CTXIAOMIPUSH.md b/templates/CTXIAOMIPUSH.md index be6371b9f..686d2683c 100644 --- a/templates/CTXIAOMIPUSH.md +++ b/templates/CTXIAOMIPUSH.md @@ -69,7 +69,7 @@ Click on [Mi Push Console](http://admin.xmpush.global.xiaomi.com/) and click on * Add the CleverTap Xiaomi Push dependency and Mi Push Dependency in your app’s `build.gradle` ```groovy - implementation "${ext.clevertap_xiaomi_sdk}${ext['version.com.clevertap.android..clevertap-xiaomi-sdk']}" + implementation "${ext.clevertap_xiaomi_sdk}" implementation fileTree(include: ["*.jar", "*.aar"], dir: "libs")// or implementation files("libs/MiPush_SDK_Client_5_0_6-G_3rd.aar") for including only MiPush_SDK_Client_5_0_6 aar file ``` diff --git a/templates/EXAMPLES.md b/templates/EXAMPLES.md index 10ac6eed8..37dff8eb1 100644 --- a/templates/EXAMPLES.md +++ b/templates/EXAMPLES.md @@ -202,16 +202,16 @@ CleverTapAPI.changeCredentials( Add the following dependencies in your app's `build.gradle` ```groovy -implementation "${ext.appcompat}${ext['version.androidx.appcompat']}"//MANDATORY for App Inbox -implementation "${ext.recyclerview}${ext['version.androidx.recyclerview']}"//MANDATORY for App Inbox -implementation "${ext.viewpager}${ext['version.androidx.viewpager']}"//MANDATORY for App Inbox -implementation "${ext.material}${ext['version.google.android.material']}"//MANDATORY for App Inbox -implementation "${ext.glide}${ext['version.com.github.bumptech.glide..glide']}"//MANDATORY for App Inbox +implementation "${ext.appcompat}"//MANDATORY for App Inbox +implementation "${ext.recyclerview}"//MANDATORY for App Inbox +implementation "${ext.viewpager}"//MANDATORY for App Inbox +implementation "${ext.material}"//MANDATORY for App Inbox +implementation "${ext.glide}"//MANDATORY for App Inbox //Optional ExoPlayer Libraries for Audio/Video Inbox Messages. Audio/Video messages will be dropped without these dependencies -implementation "${ext.exoplayer}${ext['version.com.google.android.exoplayer..exoplayer']}" -implementation "${ext.exoplayer_hls}${ext['version.com.google.android.exoplayer..exoplayer-hls']}" -implementation "${ext.exoplayer_ui}${ext['version.com.google.android.exoplayer..exoplayer-ui']}" +implementation "${ext.exoplayer}" +implementation "${ext.exoplayer_hls}" +implementation "${ext.exoplayer_ui}" ``` #### Initializing the Inbox @@ -705,14 +705,6 @@ Please note if using Google Ad Id for apps targeting Android 13+, will have to d ``` -#### Tracking the Install Referrer - -From CleverTap SDK v3.6.4 onwards, just remove the above the Broadcast Receiver if you are using it and add the following gradle dependency to capture UTM details, app install time, referrer click time and other metrics provided by the Google Install Referrer Library. - -```groovy - implementation "${ext.installreferrer}${ext['version.com.android.installreferrer..installreferrer']}" -``` - #### Remote Config Variables From CleverTap SDK v5.0.0 onwards, you can use Remote Config Variables in your app. Please refer to the [Remote Config Variables doc](Variables.md) to read more on how to integrate this to your app. diff --git a/templates/README.md b/templates/README.md index 4235d8493..55a7eeb2e 100644 --- a/templates/README.md +++ b/templates/README.md @@ -26,7 +26,7 @@ We publish the SDK to `mavenCentral` as an `AAR` file. Just declare it as depend ```groovy dependencies { - implementation "${ext.clevertap_android_sdk}${ext['version.com.clevertap.android..clevertap-android-sdk']}" + implementation "${ext.clevertap_android_sdk}" } ``` @@ -34,7 +34,7 @@ Alternatively, you can download and add the AAR file included in this repo in yo ```groovy dependencies { - implementation (name: "clevertap-android-sdk-${ext['version.com.clevertap.android..clevertap-android-sdk']}", ext: 'aar') + implementation (name: "clevertap-android-sdk-${ext['clevertap_android_sdk_version']}", ext: 'aar') } ``` @@ -46,11 +46,10 @@ Add the Firebase Messaging library and Android Support Library v4 as dependencie ```groovy dependencies { - implementation "${ext.clevertap_android_sdk}${ext['version.com.clevertap.android..clevertap-android-sdk']}" - implementation "${ext.androidx_core_core}${ext['version.androidx.core']}" - implementation "${ext.firebase_messaging}${ext['version.firebase-messaging']}" - implementation "${ext.play_services_ads}${ext['version.google.android.play-services-ads']}" // Required only if you enable Google ADID collection in the SDK (turned off by default). - implementation "${ext.installreferrer}${ext['version.com.android.installreferrer..installreferrer']}" // Mandatory for v3.6.4 and above + implementation "${ext.clevertap_android_sdk}" + implementation "${ext.androidx_core_core}" + implementation "${ext.firebase_messaging}" + implementation "${ext.play_services_ads}" // Required only if you enable Google ADID collection in the SDK (turned off by default). } ``` @@ -71,8 +70,8 @@ Also be sure to include the `google-services.json` classpath in your Project lev } dependencies { - classpath "${ext.com_android_tools_build_gradle}${ext['plugin.android']}" - classpath "${ext.google_services}${ext['version.com.google.gms..google-services']}" + classpath "${ext.com_android_tools_build_gradle}" + classpath "${ext.google_services}" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -88,9 +87,9 @@ apply plugin: 'com.google.gms.google-services' Interstitial InApp Notification templates support Audio and Video with the help of ExoPlayer. To enable Audio/Video in your Interstitial InApp Notifications, add the following dependencies in your `build.gradle` file : ```groovy - implementation "${ext.exoplayer}${ext['version.com.google.android.exoplayer..exoplayer']}" - implementation "${ext.exoplayer_hls}${ext['version.com.google.android.exoplayer..exoplayer-hls']}" - implementation "${ext.exoplayer_ui}${ext['version.com.google.android.exoplayer..exoplayer-ui']}" + implementation "${ext.exoplayer}" + implementation "${ext.exoplayer_hls}" + implementation "${ext.exoplayer_ui}" ``` Once you've updated your module `build.gradle` file, make sure you have specified `mavenCentral()` and `google()` as a repositories in your project `build.gradle` and then sync your project in File -> Sync Project with Gradle Files. diff --git a/test_shared/build.gradle b/test_shared/build.gradle index 1da39e5e2..0b5f9bdee 100644 --- a/test_shared/build.gradle +++ b/test_shared/build.gradle @@ -1,13 +1,15 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +plugins { + id('com.android.library') + id('kotlin-android') +} android { - compileSdkVersion Android.compileSdkVersionVal - buildToolsVersion Android.buildToolsVersionVal + compileSdkVersion libs.versions.android.compileSdk.get().toInteger() + buildToolsVersion libs.versions.android.buildTools.get() defaultConfig { - minSdkVersion Android.minSdkVersionVal - targetSdkVersion Android.targetSdkVersionVal + minSdkVersion libs.versions.android.minSdk.get().toInteger() + targetSdkVersion libs.versions.android.targetSdk.get().toInteger() versionCode 1 versionName "1.0" @@ -26,33 +28,31 @@ android { dependencies { api project(':clevertap-core') // Unit ing dependencies - api Libs.junit_platform_runner - api Libs.junit_jupiter_api - api Libs.junit_jupiter_engine - api Libs.kotlin_stdlib_jdk7 - api Libs.jsonassert - api Libs.gson - def mockito_version = '3.5.11' - api Libs.mockito_core - api "org.mockito:mockito-inline:$mockito_version" - api Libs.robolectric - api Libs.opentest4j - - api Libs.androidx_test_core - api Libs.androidx_test_ext_junit - - api Libs.fragment + api (libs.test.junit.platform.runner) + api (libs.test.junit.jupiter.api) + api (libs.test.junit.jupiter.engine) + api (libs.kotlin.stdlib.jdk7) + api (libs.test.jsonassert) + api (libs.gson) + api (libs.bundles.mockito) + api (libs.test.robolectric) + api (libs.test.opentest4j) + + api (libs.test.core) + api (libs.test.ext.junit) + + api (libs.androidx.fragment) // AndroidJUnitRunner and JUnit Rules - api Libs.androidx_test_runner - api Libs.androidx_test_rules - api Libs.espresso_core + api (libs.test.runner) + api (libs.test.rules) + api (libs.test.espresso.core) - api Libs.catch_exception - api Libs.androidx_core_core + api (libs.catch.exception) + api (libs.androidx.core.core) - api Libs.kotlin_test - api Libs.truth + api (libs.test.kotlin.test) + api (libs.test.truth) - api Libs.xmlpull + api (libs.test.xmlpull) } \ No newline at end of file diff --git a/versions.properties b/versions.properties deleted file mode 100644 index 85b3e1476..000000000 --- a/versions.properties +++ /dev/null @@ -1,387 +0,0 @@ -#### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.10.0 -#### -#### Don't manually edit or split the comments that start with four hashtags (####), -#### they will be overwritten by refreshVersions. -#### -#### suppress inspection "SpellCheckingInspection" for whole file -#### suppress inspection "UnusedProperty" for whole file -plugin.android=7.3.0 -## # available=7.3.0-alpha01 -## # available=7.3.0-alpha02 -## # available=7.3.0-alpha03 -## # available=7.3.0-alpha04 -## # available=7.3.0-alpha05 -## # available=7.3.0-alpha06 -## # available=7.3.0-alpha07 -## # available=7.3.0-alpha08 -## # available=7.3.0-alpha09 -## # available=7.3.0-beta01 -## # available=7.3.0-beta02 -## # available=7.3.0-beta03 -## # available=7.3.0-beta04 -## # available=7.3.0-beta05 -## # available=7.3.0-rc01 -## # available=7.3.0 -## # available=7.3.1 -## # available=7.4.0-alpha01 -## # available=7.4.0-alpha02 -## # available=7.4.0-alpha03 -## # available=7.4.0-alpha04 -## # available=7.4.0-alpha05 -## # available=7.4.0-alpha06 -## # available=7.4.0-alpha07 -## # available=7.4.0-alpha08 -## # available=7.4.0-alpha09 -## # available=7.4.0-alpha10 -## # available=7.4.0-beta01 -## # available=7.4.0-beta02 -## # available=8.0.0-alpha01 -## # available=8.0.0-alpha02 -## # available=8.0.0-alpha03 -## # available=8.0.0-alpha04 -version.androidx.test=1.4.0 -## # available=1.4.1-alpha01 -## # available=1.4.1-alpha02 -## # available=1.4.1-alpha03 -## # available=1.4.1-alpha04 -## # available=1.4.1-alpha05 -## # available=1.4.1-alpha06 -## # available=1.4.1-alpha07 -## # available=1.4.1-beta01 -version.androidx.test.core=1.4.0 -## # available=1.4.1-alpha01 -## # available=1.4.1-alpha02 -## # available=1.4.1-alpha03 -## # available=1.4.1-alpha04 -## # available=1.4.1-alpha05 -## # available=1.4.1-alpha06 -## # available=1.4.1-alpha07 -## # available=1.5.0-alpha01 -## # available=1.5.0-alpha02 -## # available=1.5.0-beta01 -version.androidx.test.espresso=3.3.0 -## # available=3.4.0-alpha01 -## # available=3.4.0-alpha02 -## # available=3.4.0-alpha03 -## # available=3.4.0-alpha04 -## # available=3.4.0-alpha05 -## # available=3.4.0-alpha06 -## # available=3.4.0-beta01 -## # available=3.4.0-beta02 -## # available=3.4.0-rc01 -## # available=3.4.0 -## # available=3.5.0-alpha01 -## # available=3.5.0-alpha02 -## # available=3.5.0-alpha03 -## # available=3.5.0-alpha04 -## # available=3.5.0-alpha05 -## # available=3.5.0-alpha06 -## # available=3.5.0-alpha07 -## # available=3.5.0-beta01 -version.androidx.test.ext.junit=1.1.3 -## # available=1.1.4-alpha01 -## # available=1.1.4-alpha02 -## # available=1.1.4-alpha03 -## # available=1.1.4-alpha04 -## # available=1.1.4-alpha05 -## # available=1.1.4-alpha06 -## # available=1.1.4-alpha07 -## # available=1.1.4-beta01 -version.com.google.code.gson..gson=2.8.6 -## # available=2.8.7 -## # available=2.8.8 -## # available=2.8.9 -## # available=2.9.0 -## # available=2.9.1 -version.com.google.gms..google-services=4.3.3 -## # available=4.3.4 -## # available=4.3.5 -## # available=4.3.6 -## # available=4.3.7 -## # available=4.3.8 -## # available=4.3.9 -## # available=4.3.10 -## # available=4.3.12 -## # available=4.3.13 -## # available=4.3.14 -version.com.google.truth..truth=1.1.3 -version.com.huawei.agconnect..agcp=1.9.0.300 -version.com.huawei.hms..push=6.11.0.300 -version.eu.codearte.catch-exception..catch-exception=2.0 -## # available=2.0.0-ALPHA-1 -## # available=2.0.0-beta-1 -version.junit=5.7.2 -### available=5.8.0-M1 -### available=5.8.0-RC1 -### available=5.8.0 -### available=5.8.1 -### available=5.8.2 -### available=5.9.0-M1 -### available=5.9.0-RC1 -### available=5.9.0 -### available=5.9.1 -version.kotlin=1.7.20 -## # available=1.5.32 -## # available=1.6.0-M1 -## # available=1.6.0-RC -## # available=1.6.0-RC2 -## # available=1.6.0 -## # available=1.6.10-RC -## # available=1.6.10 -## # available=1.6.20-M1 -## # available=1.6.20-RC -## # available=1.6.20-RC2 -## # available=1.6.20 -## # available=1.6.21 -## # available=1.7.0-Beta -## # available=1.7.0-RC -## # available=1.7.0-RC2 -## # available=1.7.0 -## # available=1.7.10 -## # available=1.7.20-Beta -## # available=1.7.20-RC -## # available=1.7.20 -version.org.awaitility..awaitility=4.1.0 -## # available=4.1.1 -## # available=4.2.0 -version.org.jacoco..org.jacoco.core=0.8.7 -version.org.junit.platform..junit-platform-runner=1.7.0 -## # available=1.7.1 -## # available=1.7.2 -## # available=1.8.0-M1 -## # available=1.8.0-RC1 -## # available=1.8.0 -## # available=1.8.1 -## # available=1.8.2 -## # available=1.9.0-M1 -## # available=1.9.0-RC1 -## # available=1.9.0 -## # available=1.9.1 -version.org.opentest4j..opentest4j=1.2.0 -version.org.powermock..powermock-api-mockito2=2.0.9 -version.org.powermock..powermock-classloading-xstream=2.0.9 -version.org.powermock..powermock-core=2.0.9 -version.org.powermock..powermock-module-junit4=2.0.9 -version.org.powermock..powermock-module-junit4-rule=2.0.9 -version.org.skyscreamer..jsonassert=1.5.0 -## # available=1.5.1 -version.org.sonarsource.scanner.gradle..sonarqube-gradle-plugin=3.3 -## # available=3.4.0.2513 -version.androidx.annotation=1.2.0 -## # available=1.3.0-alpha01 -## # available=1.3.0-beta01 -## # available=1.3.0-rc01 -## # available=1.3.0 -## # available=1.4.0-alpha01 -## # available=1.4.0-alpha02 -## # available=1.4.0-beta01 -## # available=1.4.0-rc01 -## # available=1.4.0 -## # available=1.5.0-alpha01 -## # available=1.5.0-alpha02 -## # available=1.5.0-beta01 -## # available=1.5.0-rc01 -## # available=1.5.0 -version.androidx.appcompat=1.6.0-rc01 -## # available=1.7.0-alpha01 -version.androidx.concurrent=1.1.0 -version.androidx.constraintlayout=2.0.1 -version.androidx.coordinatorlayout=1.1.0 -version.androidx.core=1.9.0 -## # available=1.3.1 -## # available=1.3.2 -## # available=1.4.0-alpha01 -## # available=1.5.0-alpha01 -## # available=1.5.0-alpha02 -## # available=1.5.0-alpha03 -## # available=1.5.0-alpha04 -## # available=1.5.0-alpha05 -## # available=1.5.0-beta01 -## # available=1.5.0-beta02 -## # available=1.5.0-beta03 -## # available=1.5.0-rc01 -## # available=1.5.0-rc02 -## # available=1.5.0 -## # available=1.6.0-alpha01 -## # available=1.6.0-alpha02 -## # available=1.6.0-alpha03 -## # available=1.6.0-beta01 -## # available=1.6.0-beta02 -## # available=1.6.0-rc01 -## # available=1.6.0 -## # available=1.7.0-alpha01 -## # available=1.7.0-alpha02 -## # available=1.7.0-beta01 -## # available=1.7.0-beta02 -## # available=1.7.0-rc01 -## # available=1.7.0 -## # available=1.8.0-alpha01 -## # available=1.8.0-alpha02 -## # available=1.8.0-alpha03 -## # available=1.8.0-alpha04 -## # available=1.8.0-alpha05 -## # available=1.8.0-alpha06 -## # available=1.8.0-alpha07 -## # available=1.8.0-beta01 -## # available=1.8.0-rc01 -## # available=1.8.0-rc02 -## # available=1.8.0 -## # available=1.9.0-alpha01 -## # available=1.9.0-alpha02 -## # available=1.9.0-alpha03 -## # available=1.9.0-alpha04 -## # available=1.9.0-alpha05 -## # available=1.9.0-beta01 -## # available=1.9.0-rc01 -## # available=1.9.0 -version.androidx.databinding=4.2.1 -version.androidx.fragment=1.3.6 -## # available=1.4.0-alpha01 -## # available=1.4.0-alpha02 -## # available=1.4.0-alpha03 -## # available=1.4.0-alpha04 -## # available=1.4.0-alpha05 -## # available=1.4.0-alpha06 -## # available=1.4.0-alpha07 -## # available=1.4.0-alpha08 -## # available=1.4.0-alpha09 -## # available=1.4.0-alpha10 -## # available=1.4.0-beta01 -## # available=1.4.0-rc01 -## # available=1.4.0 -## # available=1.4.1 -## # available=1.5.0-alpha01 -## # available=1.5.0-alpha02 -## # available=1.5.0-alpha03 -## # available=1.5.0-alpha04 -## # available=1.5.0-alpha05 -## # available=1.5.0-beta01 -## # available=1.5.0-rc01 -## # available=1.5.0 -## # available=1.5.1 -## # available=1.5.2 -## # available=1.5.3 -## # available=1.6.0-alpha01 -## # available=1.6.0-alpha02 -## # available=1.6.0-alpha03 -version.androidx.lifecycle=2.2.0 -version.androidx.multidex=2.0.1 -version.androidx.recyclerview=1.2.1 -## # available=1.3.0-alpha01 -## # available=1.3.0-alpha02 -## # available=1.3.0-beta01 -## # available=1.3.0-beta02 -## # available=1.3.0-rc01 -version.androidx.viewpager=1.0.0 -## # available=1.1.0-alpha01 -version.androidx.work=2.7.1 -## # available=2.7.1 -## # available=2.8.0-alpha01 -## # available=2.8.0-alpha02 -## # available=2.8.0-alpha03 -## # available=2.8.0-alpha04 -## # available=2.8.0-beta01 -version.com.android.installreferrer..installreferrer=2.2 -version.com.android.tools.lint..lint-api=27.0.1 -version.com.android.tools.lint..lint-checks=27.0.1 -version.com.clevertap.android..clevertap-android-sdk=5.2.1 -version.com.clevertap.android..clevertap-rendermax-sdk=1.0.3 -version.com.clevertap.android..clevertap-geofence-sdk=1.2.0 - -version.com.clevertap.android..clevertap-xiaomi-sdk=1.5.4 -version.com.clevertap.android..clevertap-hms-sdk=1.3.3 - -version.com.clevertap.android..push-templates=1.1.0 -version.com.github.bumptech.glide..glide=4.12.0 -## # available=4.13.0 -## # available=4.13.1 -## # available=4.13.2 -## # available=4.14.0 -## # available=4.14.1 -## # available=4.14.2 -version.com.google.android.exoplayer..exoplayer=2.17.1 -## # available=2.18.0 -## # available=2.18.1 -version.com.google.android.exoplayer..exoplayer-hls=2.17.1 -## # available=2.18.0 -## # available=2.18.1 -version.com.google.android.exoplayer..exoplayer-ui=2.17.1 -## # available=2.18.0 -## # available=2.18.1 -version.firebase-messaging=23.0.6 -## # available=23.0.7 -## # available=23.0.8 -## # available=23.1.0 -version.google.android.material=1.4.0 -## # available=1.5.0-alpha01 -## # available=1.5.0-alpha02 -## # available=1.5.0-alpha03 -## # available=1.5.0-alpha04 -## # available=1.5.0-alpha05 -## # available=1.5.0-beta01 -## # available=1.5.0-rc01 -## # available=1.5.0 -## # available=1.6.0-alpha01 -## # available=1.6.0-alpha02 -## # available=1.6.0-alpha03 -## # available=1.6.0-beta01 -## # available=1.6.0-rc01 -## # available=1.6.0 -## # available=1.6.1 -## # available=1.7.0-alpha01 -## # available=1.7.0-alpha02 -## # available=1.7.0-alpha03 -## # available=1.7.0-beta01 -## # available=1.7.0-rc01 -## # available=1.8.0-alpha01 -version.google.android.play-services-ads=22.3.0 -version.google.android.play-services-location=21.0.0 -## # available=19.0.0 -## # available=19.0.1 -## # available=20.0.0 -## # available=21.0.0 -version.junit.junit=4.13 -## # available=4.13.1 -## # available=4.13.2 -version.mockito=3.5.11 -## # available=3.5.13 -## # available=3.5.15 -## # available=3.6.0 -## # available=3.6.26 -## # available=3.6.28 -## # available=3.7.0 -## # available=3.7.7 -## # available=3.8.0 -## # available=3.10.0 -## # available=3.11.0 -## # available=3.11.1 -## # available=3.11.2 -## # available=3.12.0 -## # available=3.12.1 -## # available=3.12.2 -## # available=3.12.3 -## # available=3.12.4 -## # available=4.0.0 -## # available=4.1.0 -## # available=4.2.0 -## # available=4.3.0 -## # available=4.3.1 -## # available=4.4.0 -## # available=4.5.0 -## # available=4.5.1 -## # available=4.6.0 -## # available=4.6.1 -## # available=4.7.0 -## # available=4.8.0 -version.org.jacoco..org.jacoco.agent=0.7.9 -version.org.jacoco..org.jacoco.ant=0.7.9 -version.robolectric=4.7.3 -## # available=4.8-alpha-1 -## # available=4.8 -## # available=4.8.1 -## # available=4.8.2 -## # available=4.9-alpha-1 -## # available=4.9 -version.xmlpull..xmlpull=1.1.3.1 -version.kotlin.stblib=1.5.21