File tree Expand file tree Collapse file tree
src/main/java/dev/chrisbanes/accompanist/imageloading Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,12 +71,6 @@ subprojects {
7171 }
7272 }
7373
74- // Create a configuration which allows us to intercept the JARs, and add them to
75- // Kotlin Compiler freeCompilerArgs. This is needed because we can't currently use the
76- // built-in `compose` feature in AGP, since it depends on the old Compose Compiler artifacts.
77- // TODO: Remove this once AGP uses the new Compose Compiler artifact name
78- def compilerPluginConfig = project. configurations. create(" kotlinCompilerPlugin" )
79-
8074 tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach { compile ->
8175 kotlinOptions {
8276 // Treat all Kotlin warnings as errors
@@ -90,17 +84,6 @@ subprojects {
9084
9185 freeCompilerArgs + = " -Xallow-jvm-ir-dependencies"
9286 }
93-
94- compile. dependsOn(compilerPluginConfig)
95- compile. doFirst {
96- if (! compilerPluginConfig. isEmpty()) {
97- // Add the compiler plugin JARs using the -Xplugin flag
98- compile. kotlinOptions. freeCompilerArgs + =
99- " -Xplugin=${ compilerPluginConfig.files.first()} "
100- // Need to turn on the IR compiler too
101- compile. kotlinOptions. useIR = true
102- }
103- }
10487 }
10588
10689 // Read in the signing.properties file if it is exists
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ plugins {
2222 id ' org.jetbrains.dokka'
2323}
2424
25+ kotlin {
26+ explicitApi()
27+ }
28+
2529android {
2630 compileSdkVersion 30
2731
@@ -37,14 +41,7 @@ android {
3741
3842 buildFeatures {
3943 buildConfig false
40-
41- // We turn off the Compose feature for now, due to using Compose SNAPSHOTs where the
42- // Compose compiler artifact has changed artifact group/name.
43- // Instead we add the compiler manually below in the dependencies {}. Also see
44- // the root build.gradle for info on how to apply the plugin.
45- // TODO: remove this once we upgrade to an AGP version which uses the new artifact details
46-
47- // compose true
44+ compose true
4845 }
4946
5047 composeOptions {
@@ -83,9 +80,6 @@ dependencies {
8380 api project(' :imageloading-core' )
8481 api Libs.Coil . coil
8582
86- // Temporary workaround (see above)
87- kotlinCompilerPlugin Libs.AndroidX.Compose . compiler
88-
8983 implementation Libs.AndroidX . coreKtx
9084 implementation Libs.AndroidX.Compose . runtime
9185 implementation Libs.AndroidX.Compose . foundation
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ plugins {
2222 id ' org.jetbrains.dokka'
2323}
2424
25+ kotlin {
26+ explicitApi()
27+ }
28+
2529android {
2630 compileSdkVersion 30
2731
@@ -37,14 +41,7 @@ android {
3741
3842 buildFeatures {
3943 buildConfig false
40-
41- // We turn off the Compose feature for now, due to using Compose SNAPSHOTs where the
42- // Compose compiler artifact has changed artifact group/name.
43- // Instead we add the compiler manually below in the dependencies {}. Also see
44- // the root build.gradle for info on how to apply the plugin.
45- // TODO: remove this once we upgrade to an AGP version which uses the new artifact details
46-
47- // compose true
44+ compose true
4845 }
4946
5047 composeOptions {
@@ -69,9 +66,6 @@ afterEvaluate {
6966dependencies {
7067 implementation Libs.AndroidX . coreKtx
7168
72- // Temporary workaround (see above)
73- kotlinCompilerPlugin Libs.AndroidX.Compose . compiler
74-
7569 implementation Libs.AndroidX.Compose . runtime
7670 implementation Libs.AndroidX.Compose . foundation
7771
Original file line number Diff line number Diff line change @@ -121,11 +121,11 @@ fun MaterialLoadingImage(
121121) {
122122 Image (
123123 painter = if (fadeInEnabled) {
124- val animatedPainer = remember(painter) {
124+ val animatedPainter = remember(painter) {
125125 MaterialLoadingPainterWrapper (painter, fadeInDurationMs, clock).also { it.start() }
126126 }
127127 // If the animation painter is running, return use it, else use to the painter
128- if (! animatedPainer .isFinished) animatedPainer else painter
128+ if (! animatedPainter .isFinished) animatedPainter else painter
129129 } else {
130130 // If the fade is disabled, just use the standard ImagePainter
131131 painter
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ plugins {
2222 id ' org.jetbrains.dokka'
2323}
2424
25+ kotlin {
26+ explicitApi()
27+ }
28+
2529android {
2630 compileSdkVersion 30
2731
@@ -37,14 +41,7 @@ android {
3741
3842 buildFeatures {
3943 buildConfig false
40-
41- // We turn off the Compose feature for now, due to using Compose SNAPSHOTs where the
42- // Compose compiler artifact has changed artifact group/name.
43- // Instead we add the compiler manually below in the dependencies {}. Also see
44- // the root build.gradle for info on how to apply the plugin.
45- // TODO: remove this once we upgrade to an AGP version which uses the new artifact details
46-
47- // compose true
44+ compose true
4845 }
4946
5047 composeOptions {
@@ -87,8 +84,6 @@ dependencies {
8784
8885 implementation Libs.AndroidX . coreKtx
8986
90- // Temporary workaround (see above)
91- kotlinCompilerPlugin Libs.AndroidX.Compose . compiler
9287 implementation Libs.AndroidX.Compose . runtime
9388 implementation Libs.AndroidX.Compose . foundation
9489
Original file line number Diff line number Diff line change @@ -40,13 +40,7 @@ android {
4040 }
4141
4242 buildFeatures {
43- // We turn off the Compose feature for now, due to using Compose SNAPSHOTs where the
44- // Compose compiler artifact has changed artifact group/name.
45- // Instead we add the compiler manually below in the dependencies {}. Also see
46- // the root build.gradle for info on how to apply the plugin.
47- // TODO: remove this once we upgrade to an AGP version which uses the new artifact details
48-
49- // compose true
43+ compose true
5044 }
5145
5246 composeOptions {
@@ -61,9 +55,6 @@ dependencies {
6155
6256 implementation Libs.Coil . gif
6357
64- // Temporary workaround (see above)
65- kotlinCompilerPlugin Libs.AndroidX.Compose . compiler
66-
6758 implementation Libs.AndroidX.Compose . runtime
6859 implementation Libs.AndroidX.Compose . material
6960 implementation Libs.AndroidX.Compose . foundation
You can’t perform that action at this time.
0 commit comments