File tree Expand file tree Collapse file tree
build-logic/dependencies/src/main/kotlin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,29 @@ object AppExt {
5252 dependencies {
5353 alias.forEach {
5454 add(
55- " debugImplementation" ,
55+ " implementation" ,
56+ platform(libs.findLibrary(it).get())
57+ )
58+ }
59+ }
60+ }
61+
62+ fun Project.testImplementationPlatform (vararg alias : String ) {
63+ dependencies {
64+ alias.forEach {
65+ add(
66+ " testImplementation" ,
67+ platform(libs.findLibrary(it).get())
68+ )
69+ }
70+ }
71+ }
72+
73+ fun Project.androidTestImplementationPlatform (vararg alias : String ) {
74+ dependencies {
75+ alias.forEach {
76+ add(
77+ " androidTestImplementation" ,
5678 platform(libs.findLibrary(it).get())
5779 )
5880 }
@@ -92,17 +114,6 @@ object AppExt {
92114 }
93115 }
94116
95- fun Project.androidTestImplementationPlatform (vararg alias : String ) {
96- dependencies {
97- alias.forEach {
98- add(
99- " androidTestImplementation" ,
100- dependencies.platform(libs.findLibrary(it).get())
101- )
102- }
103- }
104- }
105-
106117 /* *
107118 * Find the library by alias
108119 */
Original file line number Diff line number Diff line change @@ -2,13 +2,14 @@ package com.stslex93.notes
22
33import AppExt.APP_PREFIX
44import AppExt.androidTestImplementationBundle
5+ import AppExt.androidTestImplementationPlatform
56import AppExt.coreLibraryDesugaring
67import AppExt.findVersionInt
78import AppExt.implementation
8- import AppExt.implementationPlatform
99import AppExt.ksp
1010import AppExt.libs
1111import AppExt.testImplementationBundle
12+ import AppExt.testImplementationPlatform
1213import AppExt.testRuntimeOnly
1314import com.android.build.api.dsl.CommonExtension
1415import com.android.build.gradle.AppExtension
@@ -50,7 +51,8 @@ internal fun Project.configureKotlinAndroid(
5051 dependencies {
5152 coreLibraryDesugaring(" android-desugarJdkLibs" )
5253
53- implementationPlatform(" junit-bom" )
54+ testImplementationPlatform(" junit-bom" )
55+ androidTestImplementationPlatform(" junit-bom" )
5456 testRuntimeOnly(" junit-launcher" )
5557 testImplementationBundle(" test" )
5658 androidTestImplementationBundle(" android-test" )
You can’t perform that action at this time.
0 commit comments