From f93e7e8ada40e46af65b8c13b66c93e2c4e8de04 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Tue, 21 Sep 2021 14:20:57 +0300 Subject: [PATCH] Configure build on CI --- compose/scripts/prepare | 2 +- compose/scripts/prepareAndroidx | 3 +++ compose/scripts/publish | 7 +++++++ compose/scripts/publishExtendedIcons | 7 +++++++ compose/scripts/publishWithoutInspector | 7 +++++++ gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt | 6 +++--- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 compose/scripts/prepareAndroidx diff --git a/compose/scripts/prepare b/compose/scripts/prepare index 57dec964e5..9ec29c7a2e 100755 --- a/compose/scripts/prepare +++ b/compose/scripts/prepare @@ -6,4 +6,4 @@ export ALLOW_PUBLIC_REPOS=1 export JAVA_TOOLS_JAR=$SCRIPT_DIR/../external/tools.jar export ANDROIDX_PROJECTS=COMPOSE export COMPOSE_CUSTOM_GROUP=org.jetbrains.compose -export COMPOSE_DEFAULT_GRADLE_ARGS="-Pandroidx.compose.multiplatformEnabled=true -Pandroidx.versionExtraCheckEnabled=false -Pandroidx.alternativeProjectUrl=https://github.com/JetBrains/compose-jb -Pandroidx.compose.jsCompilerTestsEnabled=true -Pandroidx.validateProjectStructure=false" \ No newline at end of file +export COMPOSE_DEFAULT_GRADLE_ARGS="-Pandroidx.compose.multiplatformEnabled=true -Pandroidx.versionExtraCheckEnabled=false -Pandroidx.alternativeProjectUrl=https://github.com/JetBrains/compose-jb -Pandroidx.compose.jsCompilerTestsEnabled=true -Pandroidx.validateProjectStructure=false -Pandroidx.compose.openExpectLiteMode=org_jetbrains" \ No newline at end of file diff --git a/compose/scripts/prepareAndroidx b/compose/scripts/prepareAndroidx new file mode 100644 index 0000000000..ce14b694d1 --- /dev/null +++ b/compose/scripts/prepareAndroidx @@ -0,0 +1,3 @@ +#!/bin/bash +export COMPOSE_CUSTOM_GROUP=androidx.compose +export COMPOSE_DEFAULT_GRADLE_ARGS="-Pandroidx.compose.openExpectLiteMode=androidx $COMPOSE_DEFAULT_GRADLE_ARGS" \ No newline at end of file diff --git a/compose/scripts/publish b/compose/scripts/publish index adbb4087bd..3505dfe025 100755 --- a/compose/scripts/publish +++ b/compose/scripts/publish @@ -3,6 +3,13 @@ cd "$(dirname "$0")" . ./prepare +pushd .. +./gradlew publishComposeJb $COMPOSE_DEFAULT_GRADLE_ARGS "$@" || exit 1 +popd + + +. ./prepareAndroidx + pushd .. ./gradlew publishComposeJb $COMPOSE_DEFAULT_GRADLE_ARGS "$@" || exit 1 popd \ No newline at end of file diff --git a/compose/scripts/publishExtendedIcons b/compose/scripts/publishExtendedIcons index 54dd4d0bbd..b731129859 100755 --- a/compose/scripts/publishExtendedIcons +++ b/compose/scripts/publishExtendedIcons @@ -6,3 +6,10 @@ cd "$(dirname "$0")" pushd .. ./gradlew publishComposeJbExtendedIcons $COMPOSE_DEFAULT_GRADLE_ARGS --max-workers=1 "$@" || exit 1 popd + + +. ./prepareAndroidx + +pushd .. +./gradlew publishComposeJbExtendedIcons $COMPOSE_DEFAULT_GRADLE_ARGS --max-workers=1 "$@" || exit 1 +popd \ No newline at end of file diff --git a/compose/scripts/publishWithoutInspector b/compose/scripts/publishWithoutInspector index d1fd6e8f5b..7d7d3eefd9 100755 --- a/compose/scripts/publishWithoutInspector +++ b/compose/scripts/publishWithoutInspector @@ -7,6 +7,13 @@ cd "$(dirname "$0")" . ./prepare +pushd .. +./gradlew publishComposeJb $COMPOSE_DEFAULT_GRADLE_ARGS -x :support:compose:ui:ui-inspection:assembleInspectorJarRelease -x :support:compose:ui:ui-inspection:dexInspectorRelease "$@" || exit 1 +popd + + +. ./prepareAndroidx + pushd .. ./gradlew publishComposeJb $COMPOSE_DEFAULT_GRADLE_ARGS -x :support:compose:ui:ui-inspection:assembleInspectorJarRelease -x :support:compose:ui:ui-inspection:dexInspectorRelease "$@" || exit 1 popd \ No newline at end of file diff --git a/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt b/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt index 1313bf8a26..57310948e6 100644 --- a/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt +++ b/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt @@ -14,9 +14,9 @@ object BuildProperties { fun composeVersion(project: Project): String = System.getenv("COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION") ?: project.findProperty("compose.version") as String - fun composeAndroidxVersion(project: Project): String = - System.getenv("COMPOSE_ANDROIDX_VERSION") - ?: project.findProperty("compose.androidx.version") as String + fun composeAndroidxVersion(project: Project): String = composeVersion(project) // temporaly use the same version until we merge it to jb-main +// System.getenv("COMPOSE_ANDROIDX_VERSION") +// ?: project.findProperty("compose.androidx.version") as String fun deployVersion(project: Project): String = System.getenv("COMPOSE_GRADLE_PLUGIN_VERSION") ?: project.findProperty("deploy.version") as String