mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-05-08 08:11:20 +00:00
Compose as submodule, scripts for build/test Compose (#830)
- add run configurations for IDEA / Android Studio - configure CI to use those scripts to build everything: 0.0.0-newci-316 (with desktop/web components)
This commit is contained in:
48
compose/scripts/downloadAndroidSdk
Executable file
48
compose/scripts/downloadAndroidSdk
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
clone() {
|
||||
mkdir -p $1
|
||||
pushd $1
|
||||
git init
|
||||
git config advice.detachedHead false
|
||||
git fetch --depth=1 $2 $3
|
||||
git checkout FETCH_HEAD
|
||||
popd
|
||||
}
|
||||
|
||||
downloadLinuxSDK() {
|
||||
clone ../prebuilts/fullsdk-linux/platforms/android-30 https://android.googlesource.com/platform/prebuilts/fullsdk/platforms/android-30 master
|
||||
clone ../prebuilts/fullsdk-linux/sources/android-30 https://android.googlesource.com/platform/prebuilts/fullsdk/sources/android-30 master
|
||||
clone ../prebuilts/fullsdk-linux/ndk https://android.googlesource.com/toolchain/prebuilts/ndk/r21 master
|
||||
clone ../prebuilts/fullsdk-linux/build-tools/30.0.2 https://android.googlesource.com/platform/prebuilts/fullsdk-linux/build-tools/30.0.2 master
|
||||
clone ../prebuilts/fullsdk-linux/platform-tools https://android.googlesource.com/platform/prebuilts/fullsdk-linux/platform-tools master
|
||||
clone ../prebuilts/fullsdk-linux/tools https://android.googlesource.com/platform/prebuilts/fullsdk-linux/tools master
|
||||
clone ../prebuilts/fullsdk-linux/cmake https://android.googlesource.com/platform/prebuilts/cmake/linux-x86 de5fa1c66d3bdcbf2bbc62d2504ec6b0b0fb74e1
|
||||
}
|
||||
|
||||
downloadMacOsSDK() {
|
||||
clone ../prebuilts/fullsdk-darwin/platforms/android-30 https://android.googlesource.com/platform/prebuilts/fullsdk/platforms/android-30 master
|
||||
clone ../prebuilts/fullsdk-darwin/sources/android-30 https://android.googlesource.com/platform/prebuilts/fullsdk/sources/android-30 master
|
||||
clone ../prebuilts/fullsdk-darwin/ndk https://android.googlesource.com/toolchain/prebuilts/ndk-darwin/r21 master
|
||||
clone ../prebuilts/fullsdk-darwin/build-tools/30.0.2 https://android.googlesource.com/platform/prebuilts/fullsdk-darwin/build-tools/30.0.2 master
|
||||
clone ../prebuilts/fullsdk-darwin/platform-tools https://android.googlesource.com/platform/prebuilts/fullsdk-darwin/platform-tools master
|
||||
clone ../prebuilts/fullsdk-darwin/tools https://android.googlesource.com/platform/prebuilts/fullsdk-darwin/tools master
|
||||
clone ../prebuilts/fullsdk-darwin/cmake https://android.googlesource.com/platform/prebuilts/cmake/darwin-x86 de5fa1c66d3bdcbf2bbc62d2504ec6b0b0fb74e1
|
||||
}
|
||||
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
downloadLinuxSDK
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
downloadMacOsSDK
|
||||
elif [[ "$OSTYPE" == "cygwin" ]]; then
|
||||
echo "Please download Android SDK manually (https://developer.android.com/studio)"
|
||||
elif [[ "$OSTYPE" == "msys" ]]; then
|
||||
echo "Please download Android SDK manually (https://developer.android.com/studio)"
|
||||
elif [[ "$OSTYPE" == "win32" ]]; then
|
||||
echo "Please download Android SDK manually (https://developer.android.com/studio)"
|
||||
else
|
||||
echo "Unknown OS"
|
||||
fi
|
||||
|
||||
9
compose/scripts/prepare
Executable file
9
compose/scripts/prepare
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
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"
|
||||
8
compose/scripts/publish
Executable file
8
compose/scripts/publish
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
. ./prepare
|
||||
|
||||
pushd ..
|
||||
./gradlew publishComposeJb $COMPOSE_DEFAULT_GRADLE_ARGS "$@" || exit 1
|
||||
popd
|
||||
8
compose/scripts/publishExtendedIcons
Executable file
8
compose/scripts/publishExtendedIcons
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
. ./prepare
|
||||
|
||||
pushd ..
|
||||
./gradlew publishComposeJbExtendedIcons $COMPOSE_DEFAULT_GRADLE_ARGS --max-workers=1 "$@" || exit 1
|
||||
popd
|
||||
12
compose/scripts/publishWithoutInspector
Executable file
12
compose/scripts/publishWithoutInspector
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Publish artifact without Android Layout Inspector
|
||||
# Should be used is there are errors building it (on Windows, for example)
|
||||
# Shouldn't be used for publishing release artifacts
|
||||
|
||||
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
|
||||
8
compose/scripts/testAll
Executable file
8
compose/scripts/testAll
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
. ./prepare
|
||||
|
||||
pushd ..
|
||||
./gradlew testComposeJbDesktop testComposeJbWeb $COMPOSE_DEFAULT_GRADLE_ARGS "$@" || exit 1
|
||||
popd
|
||||
8
compose/scripts/testDesktop
Executable file
8
compose/scripts/testDesktop
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
. ./prepare
|
||||
|
||||
pushd ..
|
||||
./gradlew testComposeJbDesktop $COMPOSE_DEFAULT_GRADLE_ARGS "$@" || exit 1
|
||||
popd
|
||||
8
compose/scripts/testWeb
Executable file
8
compose/scripts/testWeb
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
. ./prepare
|
||||
|
||||
pushd ..
|
||||
./gradlew testComposeJbWeb $COMPOSE_DEFAULT_GRADLE_ARGS "$@" || exit 1
|
||||
popd
|
||||
Reference in New Issue
Block a user