Skip to content

Commit

Permalink
[SDK-2955]: Version Catalog (#430)
Browse files Browse the repository at this point in the history
* task(SDK-2955) - Create version catalog file with all dependencies

* task(SDK-2955) - bump AGP to v7.4.2, gradle-wrapper.properties to support version catalog, refactor settings.gradle.kts to support version catalog dependencies

* task(SDK-2955) - Update all modules build.gradle to read dependencies from libs.versions.toml

* task(SDK-2955) - Refactor project's settings.gradle

* task(SDK-2955) - Refactor libraryVersion keys, update Libs.kt

* task(SDK-2955) - Adds missing detekt dependencies

* task(SDK-2955) - Refactor versions keys across modules

* task(SDK-2955) - Refactor versions.properties to add only versions needed for `copyTemplates` task

* task(SDK-2955) - Updates template docs to fetch versions from toml file

* task(SDK-2955) - Updates gradle files to correctly fetch dependencies and versions

* task(SDK-2955) - Changes apply plugin to plugin blocks

* task(SDK-2955) - Removes unnecessary formatting and files

* task(SDK-2955) - Moves crashlytics and detekt plugin to version catalog

* task(SDK-2955) - Removes the buildSrc module

* task(SDK-2955) - Moves crashlytics to toml

* Apply from moved to top

- moved together

* Formatted the deps

- based on types

* Upgraded versions

- as per latest develop branch
- this was left in conflict res

* task(SDK-2955) - Creates bundles for power mock and mockito

* Kotlin options in clevertap-core

- we did not add the kotlin options block. Made it uniform as per the project

* task(SDK-2955) - Update Docs to remove install-referrer

---------

Co-authored-by: anush <anush@clevertap.com>
Co-authored-by: CTLalit <lalitkumar@clevertap.com>
  • Loading branch information
3 people authored Nov 29, 2023
1 parent 0685d3a commit 5ac6b24
Show file tree
Hide file tree
Showing 26 changed files with 386 additions and 862 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand All @@ -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
Expand Down
75 changes: 36 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -36,8 +35,6 @@ allprojects {
}
}

apply plugin: 'jacoco'
apply plugin: 'org.sonarqube'
sonarqube {
properties {
property "sonar.projectKey", "CleverTap_clevertap-android-sdk"
Expand All @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions buildSrc/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions buildSrc/build.gradle.kts

This file was deleted.

25 changes: 0 additions & 25 deletions buildSrc/settings.gradle.kts

This file was deleted.

191 changes: 0 additions & 191 deletions buildSrc/src/main/kotlin/Libs.kt

This file was deleted.

Loading

0 comments on commit 5ac6b24

Please sign in to comment.