Skip to content

Commit 54c2c19

Browse files
committed
Add dexcount plugin
(cherry picked from commit 4c227b8) (cherry picked from commit 2e196e4)
1 parent 40b343a commit 54c2c19

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

app/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id("com.android.application")
33
kotlin("android")
4+
id("com.getkeepsafe.dexcount")
45
}
56

67
android {

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Versions used for dependency resolution in settings.gradle.kts
22
kotlinVersion=1.4.10
33
androidGradlePluginVersion=4.1.0
4+
dexcountPluginVersion=2.0.0
45

56
# Specifies the JVM arguments used for the daemon process.
67
# The setting is particularly useful for tweaking memory settings.

settings.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ include("app")
33
pluginManagement {
44
val kotlinVersion: String by settings
55
val androidGradlePluginVersion: String by settings
6+
val dexcountPluginVersion: String by settings
67
repositories {
78
google()
89
gradlePluginPortal()
910
}
1011
resolutionStrategy {
1112
eachPlugin {
12-
if (requested.id.id == "com.android.application") {
13-
useModule("com.android.tools.build:gradle:$androidGradlePluginVersion")
14-
}
15-
if (requested.id.namespace == "org.jetbrains.kotlin") {
16-
useVersion(kotlinVersion)
13+
when {
14+
requested.id.id == "com.android.application" -> useModule("com.android.tools.build:gradle:$androidGradlePluginVersion")
15+
requested.id.id == "com.getkeepsafe.dexcount" -> useVersion(dexcountPluginVersion)
16+
requested.id.namespace == "org.jetbrains.kotlin" -> useVersion(kotlinVersion)
1717
}
1818
}
1919
}

0 commit comments

Comments
 (0)