Browse Source
Remove: ``` __LATEST_COMPOSE_RELEASE_VERSION__ __KOTLIN_COMPOSE_VERSION__ System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ``` They pollute templates/examples. Now, all paths where we need to change the version are hardcoded in the script. Usage: ``` ./replace.sh 1.0.0-rc6 ``` This script is planned to run on CI In the future I will add support for changing Kotlin versionpull/2159/head
Igor Demin
3 years ago
committed by
GitHub
74 changed files with 371 additions and 245 deletions
@ -1,3 +1,2 @@ |
|||||||
# __LATEST_COMPOSE_RELEASE_VERSION__ |
|
||||||
compose.version=1.0.0 |
compose.version=1.0.0 |
||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
@ -1,2 +1,16 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
kotlin("jvm").version(extra["kotlin.version"] as String) |
||||||
|
kotlin("multiplatform").version(extra["kotlin.version"] as String) |
||||||
|
id("org.jetbrains.compose").version(extra["compose.version"] as String) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":SplitPane:library") |
include(":SplitPane:library") |
||||||
include(":SplitPane:demo") |
include(":SplitPane:demo") |
@ -1 +1,22 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
val kotlinVersion = extra["kotlin.version"] as String |
||||||
|
val agpVersion = extra["agp.version"] as String |
||||||
|
val composeVersion = extra["compose.version"] as String |
||||||
|
|
||||||
|
kotlin("jvm").version(kotlinVersion) |
||||||
|
kotlin("multiplatform").version(kotlinVersion) |
||||||
|
kotlin("android").version(kotlinVersion) |
||||||
|
id("com.android.application").version(agpVersion) |
||||||
|
id("com.android.library").version(agpVersion) |
||||||
|
id("org.jetbrains.compose").version(composeVersion) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":common", ":android", ":desktop") |
include(":common", ":android", ":desktop") |
||||||
|
@ -0,0 +1,2 @@ |
|||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
@ -1 +1,3 @@ |
|||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
||||||
|
@ -1 +1,8 @@ |
|||||||
|
pluginManagement { |
||||||
|
plugins { |
||||||
|
kotlin("jvm").version(extra["kotlin.version"] as String) |
||||||
|
id("org.jetbrains.compose").version(extra["compose.version"] as String) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
rootProject.name = "falling_balls" |
rootProject.name = "falling_balls" |
||||||
|
@ -1 +1,22 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
val kotlinVersion = extra["kotlin.version"] as String |
||||||
|
val agpVersion = extra["agp.version"] as String |
||||||
|
val composeVersion = extra["compose.version"] as String |
||||||
|
|
||||||
|
kotlin("jvm").version(kotlinVersion) |
||||||
|
kotlin("multiplatform").version(kotlinVersion) |
||||||
|
kotlin("android").version(kotlinVersion) |
||||||
|
id("com.android.application").version(agpVersion) |
||||||
|
id("com.android.library").version(agpVersion) |
||||||
|
id("org.jetbrains.compose").version(composeVersion) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":common", ":android", ":desktop") |
include(":common", ":android", ":desktop") |
||||||
|
@ -1 +1,3 @@ |
|||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
||||||
|
@ -1,9 +1,8 @@ |
|||||||
rootProject.name = "ComposeDemoPlugin" |
rootProject.name = "ComposeDemoPlugin" |
||||||
|
|
||||||
pluginManagement { |
pluginManagement { |
||||||
repositories { |
plugins { |
||||||
gradlePluginPortal() |
kotlin("jvm").version(extra["kotlin.version"] as String) |
||||||
mavenCentral() |
id("org.jetbrains.compose").version(extra["compose.version"] as String) |
||||||
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") } |
|
||||||
} |
} |
||||||
} |
} |
@ -1 +1,22 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
val kotlinVersion = extra["kotlin.version"] as String |
||||||
|
val agpVersion = extra["agp.version"] as String |
||||||
|
val composeVersion = extra["compose.version"] as String |
||||||
|
|
||||||
|
kotlin("jvm").version(kotlinVersion) |
||||||
|
kotlin("multiplatform").version(kotlinVersion) |
||||||
|
kotlin("android").version(kotlinVersion) |
||||||
|
id("com.android.application").version(agpVersion) |
||||||
|
id("com.android.library").version(agpVersion) |
||||||
|
id("org.jetbrains.compose").version(composeVersion) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":common", ":android", ":desktop") |
include(":common", ":android", ":desktop") |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 |
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 |
||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
||||||
|
@ -1 +1,22 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
val kotlinVersion = extra["kotlin.version"] as String |
||||||
|
val agpVersion = extra["agp.version"] as String |
||||||
|
val composeVersion = extra["compose.version"] as String |
||||||
|
|
||||||
|
kotlin("jvm").version(kotlinVersion) |
||||||
|
kotlin("multiplatform").version(kotlinVersion) |
||||||
|
kotlin("android").version(kotlinVersion) |
||||||
|
id("com.android.application").version(agpVersion) |
||||||
|
id("com.android.library").version(agpVersion) |
||||||
|
id("org.jetbrains.compose").version(composeVersion) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":common", ":android", ":desktop") |
include(":common", ":android", ":desktop") |
||||||
|
@ -0,0 +1,2 @@ |
|||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
@ -1 +1,3 @@ |
|||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
@ -1,10 +1,13 @@ |
|||||||
pluginManagement { |
pluginManagement { |
||||||
repositories { |
repositories { |
||||||
gradlePluginPortal() |
gradlePluginPortal() |
||||||
mavenCentral() |
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") } |
|
||||||
} |
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
kotlin("jvm").version(extra["kotlin.version"] as String) |
||||||
|
id("org.jetbrains.compose").version(extra["compose.version"] as String) |
||||||
|
} |
||||||
} |
} |
||||||
rootProject.name = "visual-effects" |
|
||||||
|
|
||||||
|
rootProject.name = "visual-effects" |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 |
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
||||||
|
@ -1,9 +1,15 @@ |
|||||||
pluginManagement { |
pluginManagement { |
||||||
repositories { |
repositories { |
||||||
gradlePluginPortal() |
gradlePluginPortal() |
||||||
|
mavenCentral() |
||||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
google() |
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
kotlin("multiplatform").version(extra["kotlin.version"] as String) |
||||||
|
id("org.jetbrains.compose").version(extra["compose.version"] as String) |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
rootProject.name = "web-compose-bird" |
rootProject.name = "web-compose-bird" |
||||||
|
|
||||||
|
@ -1 +1,3 @@ |
|||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
||||||
|
@ -1 +1,3 @@ |
|||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
||||||
|
@ -1 +1,22 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
val kotlinVersion = extra["kotlin.version"] as String |
||||||
|
val agpVersion = extra["agp.version"] as String |
||||||
|
val composeVersion = extra["compose.version"] as String |
||||||
|
|
||||||
|
kotlin("jvm").version(kotlinVersion) |
||||||
|
kotlin("multiplatform").version(kotlinVersion) |
||||||
|
kotlin("android").version(kotlinVersion) |
||||||
|
id("com.android.application").version(agpVersion) |
||||||
|
id("com.android.library").version(agpVersion) |
||||||
|
id("org.jetbrains.compose").version(composeVersion) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":common", ":android", ":desktop") |
include(":common", ":android", ":desktop") |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 |
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 |
||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
@ -1 +1,18 @@ |
|||||||
|
pluginManagement { |
||||||
|
repositories { |
||||||
|
gradlePluginPortal() |
||||||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") |
||||||
|
google() |
||||||
|
} |
||||||
|
|
||||||
|
plugins { |
||||||
|
kotlin("jvm").version(extra["kotlin.version"] as String) |
||||||
|
kotlin("multiplatform").version(extra["kotlin.version"] as String) |
||||||
|
kotlin("android").version(extra["kotlin.version"] as String) |
||||||
|
id("com.android.application").version(extra["agp.version"] as String) |
||||||
|
id("com.android.library").version(extra["agp.version"] as String) |
||||||
|
id("org.jetbrains.compose").version(extra["compose.version"] as String) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
include(":common", ":android", ":desktop") |
include(":common", ":android", ":desktop") |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 |
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 |
||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
kotlin.version=1.5.31 |
||||||
|
compose.version=1.0.0 |
@ -1,13 +1,51 @@ |
|||||||
#!/bin/bash |
#!/bin/bash |
||||||
|
|
||||||
|
# Replace hard-coded Compose version in Compose repo projects. Usage: ./replace.sh 1.0.0-rc6 |
||||||
|
|
||||||
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/.. |
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/.. |
||||||
COMPOSE_OLDVER=0.4.0-rc2 |
|
||||||
COMPOSE_NEWVER=0.4.0 |
# Add folders which should contain up-to-date versions |
||||||
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$COMPOSE_OLDVER/$COMPOSE_NEWVER/g" {} \; |
declare -a folders=( |
||||||
APPCOMPAT_OLDVER=1.1.0 |
"templates" |
||||||
APPCOMPAT_NEWVER=1.3.0-beta01 |
"examples" |
||||||
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$APPCOMPAT_OLDVER/$APPCOMPAT_NEWVER/g" {} \; |
"gradle-plugins" |
||||||
KOTLIN_OLDVER=1.5.10 |
"components" |
||||||
KOTLIN_NEWVER=1.5.10 |
"ci" |
||||||
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$KOTLIN_OLDVER/$KOTLIN_NEWVER/g" {} \; |
"web" |
||||||
git grep -C 1 __KOTLIN_COMPOSE_VERSION__ $ROOT |
"tutorials" |
||||||
git grep -C 1 __LATEST_COMPOSE_RELEASE_VERSION__ $ROOT |
) |
||||||
|
|
||||||
|
if [ -z "$@" ]; then |
||||||
|
echo "Specify Compose version. For example: ./replace.sh 1.0.0-rc6" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
COMPOSE_VERSION=$@ |
||||||
|
|
||||||
|
if [[ $OSTYPE == 'darwin'* ]]; then |
||||||
|
SED=gsed |
||||||
|
else |
||||||
|
SED=sed |
||||||
|
fi |
||||||
|
|
||||||
|
replaceCompose() { |
||||||
|
$SED -i -e "s/$1/$2/g" $3 |
||||||
|
} |
||||||
|
|
||||||
|
replaceComposeInFile() { |
||||||
|
echo "Replace in $1" |
||||||
|
replaceCompose '^compose.version=.*' 'compose.version='"$COMPOSE_VERSION"'' $1 |
||||||
|
replaceCompose '^COMPOSE_CORE_VERSION=.*' 'COMPOSE_CORE_VERSION='"$COMPOSE_VERSION"'' $1 |
||||||
|
replaceCompose '^COMPOSE_WEB_VERSION=.*' 'COMPOSE_WEB_VERSION='"$COMPOSE_VERSION"'' $1 |
||||||
|
replaceCompose 'id("org.jetbrains.compose") version ".*"' 'id("org.jetbrains.compose") version "'"$COMPOSE_VERSION"'"' $1 |
||||||
|
replaceCompose '"org.jetbrains.compose:compose-gradle-plugin:.*"' '"org.jetbrains.compose:compose-gradle-plugin:'"$COMPOSE_VERSION"'"' $1 |
||||||
|
} |
||||||
|
|
||||||
|
replaceComposeInFolder() { |
||||||
|
find $ROOT/$1 -wholename $2 -not -path "**/build**" -not -path "**/.gradle**" | while read file; do replaceComposeInFile "$file"; done |
||||||
|
} |
||||||
|
|
||||||
|
for folder in "${folders[@]}" |
||||||
|
do |
||||||
|
replaceComposeInFolder $folder "**gradle.properties" |
||||||
|
replaceComposeInFolder $folder "**README.md" |
||||||
|
done |
||||||
|
@ -1,9 +1,8 @@ |
|||||||
RUN from project root directory: |
RUN from project root directory: |
||||||
`./gradlew :compose-compiler-integration:checkComposeCases` |
`./gradlew :compose-compiler-integration:checkComposeCases` |
||||||
|
|
||||||
|
To use specific version: |
||||||
To use specific version (the default is 0.0.0-SNASPHOT): |
`./gradlew :compose-compiler-integration:checkComposeCases -PCOMPOSE_CORE_VERSION=1.0.0 -PCOMPOSE_WEB_VERSION=1.0.0 |
||||||
`./gradlew :compose-compiler-integration:checkComposeCases -PCOMPOSE_CORE_VERSION=0.5.0-build243` |
|
||||||
|
|
||||||
To fun only filtered cases (check for contained in file path): |
To fun only filtered cases (check for contained in file path): |
||||||
`./gradlew :compose-compiler-integration:checkComposeCases -PFILTER_CASES=CaseName` |
`./gradlew :compose-compiler-integration:checkComposeCases -PFILTER_CASES=CaseName` |
||||||
|
Loading…
Reference in new issue