Browse Source

Change Compose build scripts

pull/1227/head
Igor Demin 4 years ago
parent
commit
6a8c869b46
  1. 23
      compose/.run/publish (without Android Layout Inspector).run.xml
  2. 2
      compose/.run/test (web).run.xml
  3. 6
      compose/README.md
  4. 21
      compose/build.gradle.kts
  5. 2
      compose/scripts/prepare
  6. 12
      compose/scripts/publishWithoutInspector

23
compose/.run/publish (without Android Layout Inspector).run.xml

@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="publish (without Android Layout Inspector)" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-Pandroidx.compose.multiplatformEnabled=true -Pandroidx.versionExtraCheckEnabled=false -Pandroidx.alternativeProjectUrl=https://github.com/JetBrains/compose-jb -Pandroidx.validateProjectStructure=false -x :support:compose:ui:ui-inspection:assembleInspectorJarRelease -x :support:compose:ui:ui-inspection:dexInspectorRelease" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="publishComposeJb" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

2
compose/.run/test (web).run.xml

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-Pandroidx.compose.jsCompilerTestsEnabled=true -Pandroidx.compose.multiplatformEnabled=true" />
<option name="scriptParameters" value="-Pjetbrains.compose.jsCompilerTestsEnabled=true -Pandroidx.compose.multiplatformEnabled=true" />
<option name="taskDescriptions">
<list />
</option>

6
compose/README.md

@ -43,10 +43,8 @@ Publish artifacts to the local directory `out/androidx/build/support_repo/org/je @@ -43,10 +43,8 @@ Publish artifacts to the local directory `out/androidx/build/support_repo/org/je
```
./scripts/publish
```
Publish artifacts without Android Layout Inspector (use it on Windows):
```
./scripts/publishWithoutInspector
```
(on Windows it doesn't build at the moment, the issue is in the line `packageInspector(project, project(":compose:ui:ui-inspection")` in `compose/frameworks/support/compose/ui/ui/build.gradle`)
Publish extended icons:
```
./scripts/publishExtendedIcons

21
compose/build.gradle.kts

@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
val composeBuild = gradle.includedBuild("support")
fun Task.dependsOnComposeTask(name: String) = dependsOn(composeBuild.task(name))
gradle.startParameter.excludedTaskNames.add(":support:compose:ui:ui-inspection:assembleInspectorJarRelease")
gradle.startParameter.excludedTaskNames.add(":support:compose:ui:ui-inspection:dexInspectorRelease")
val isWebExists = composeBuild.projectDir.resolve(".jbWebBranchMergedMarker").exists()
// To show all projects which use `xxx` task, run:
// ./gradlew -p frameworks/support help --task xxx
@ -47,10 +46,12 @@ tasks.register("publishComposeJb") { @@ -47,10 +46,12 @@ tasks.register("publishComposeJb") {
dependsOnComposeTask("$it:publishAndroidReleasePublicationToMavenRepository")
}
listOf(
":compose:runtime:runtime",
).forEach {
dependsOnComposeTask("$it:publishJsPublicationToMavenRepository")
if (isWebExists) {
listOf(
":compose:runtime:runtime",
).forEach {
dependsOnComposeTask("$it:publishJsPublicationToMavenRepository")
}
}
}
@ -82,9 +83,11 @@ tasks.register("testComposeJbDesktop") { @@ -82,9 +83,11 @@ tasks.register("testComposeJbDesktop") {
dependsOnComposeTask(":compose:runtime:runtime-saveable:desktopTest")
}
tasks.register("testComposeJbWeb") {
dependsOnComposeTask(":compose:runtime:runtime:jsTest")
dependsOnComposeTask(":compose:runtime:runtime:test")
if (isWebExists) {
tasks.register("testComposeJbWeb") {
dependsOnComposeTask(":compose:runtime:runtime:jsTest")
dependsOnComposeTask(":compose:runtime:runtime:test")
}
}
tasks.register("buildNativeDemo") {

2
compose/scripts/prepare

@ -6,4 +6,4 @@ export ALLOW_PUBLIC_REPOS=1 @@ -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"
export COMPOSE_DEFAULT_GRADLE_ARGS="-Pandroidx.compose.multiplatformEnabled=true -Pandroidx.versionExtraCheckEnabled=false -Pandroidx.alternativeProjectUrl=https://github.com/JetBrains/compose-jb -Pjetbrains.compose.jsCompilerTestsEnabled=true -Pandroidx.validateProjectStructure=false"

12
compose/scripts/publishWithoutInspector

@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
#!/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
Loading…
Cancel
Save