Browse Source

Disable Android build if redirecting to Jetpack Compose is enabled (#1322)

release/1.0-beta
Igor Demin 3 years ago committed by GitHub
parent
commit
42d19b3801
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      compose/build.gradle.kts

9
compose/build.gradle.kts

@ -1,6 +1,7 @@
val composeBuild = gradle.includedBuild("support")
fun Task.dependsOnComposeTask(name: String) = dependsOn(composeBuild.task(name))
val isOelPublication = project.findProperty("oel.publication") == "true"
val isWebExist = composeBuild.projectDir.resolve(".jbWebExistsMarker").exists()
// To show all projects which use `xxx` task, run:
@ -42,9 +43,12 @@ tasks.register("publishComposeJb") {
).forEach {
dependsOnComposeTask("$it:publishKotlinMultiplatformPublicationToMavenRepository")
dependsOnComposeTask("$it:publishDesktopPublicationToMavenRepository")
if (!isOelPublication) {
dependsOnComposeTask("$it:publishAndroidDebugPublicationToMavenRepository")
dependsOnComposeTask("$it:publishAndroidReleasePublicationToMavenRepository")
}
}
if (isWebExist) {
listOf(
@ -63,10 +67,13 @@ tasks.register("publishComposeJbExtendedIcons") {
).forEach {
dependsOnComposeTask("$it:publishKotlinMultiplatformPublicationToMavenRepository")
dependsOnComposeTask("$it:publishDesktopPublicationToMavenRepository")
if (!isOelPublication) {
dependsOnComposeTask("$it:publishAndroidDebugPublicationToMavenRepository")
dependsOnComposeTask("$it:publishAndroidReleasePublicationToMavenRepository")
}
}
}
tasks.register("testComposeJbDesktop") {
dependsOnComposeTask(":compose:desktop:desktop:jvmTest")
@ -99,7 +106,7 @@ tasks.register("testRuntimeNative") {
}
tasks.register("testComposeModules") { // used in https://github.com/JetBrains/androidx/tree/jb-main/.github/workflows
// TODO: donwload robolectrict to run ui:ui:test
// TODO: download robolectrict to run ui:ui:test
// dependsOnComposeTask(":compose:ui:ui:test")
dependsOnComposeTask(":compose:ui:ui-graphics:test")

Loading…
Cancel
Save