Browse Source

Update Kotlin version

pull/2352/head
Igor Demin 2 years ago
parent
commit
5d67a73f80
  1. 2
      components/gradle.properties
  2. 2
      examples/codeviewer/gradle.properties
  3. 2
      examples/falling-balls/gradle.properties
  4. 2
      examples/imageviewer/gradle.properties
  5. 2
      examples/intellij-plugin-with-experimental-shared-base/gradle.properties
  6. 2
      examples/intellij-plugin/gradle.properties
  7. 2
      examples/issues/gradle.properties
  8. 2
      examples/notepad/gradle.properties
  9. 2
      examples/todoapp-lite/gradle.properties
  10. 2
      examples/todoapp/gradle.properties
  11. 2
      examples/visual-effects/gradle.properties
  12. 2
      examples/web-compose-bird/gradle.properties
  13. 2
      examples/web-landing/gradle.properties
  14. 2
      examples/web-with-react/gradle.properties
  15. 2
      examples/widgets-gallery/gradle.properties
  16. 2
      templates/desktop-template/gradle.properties
  17. 2
      templates/multiplatform-template/gradle.properties
  18. 2
      templates/web-template/gradle.properties
  19. 36
      tools/replaceVersion.sh

2
components/gradle.properties

@ -3,6 +3,6 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
kotlin.code.style=official kotlin.code.style=official
# __KOTLIN_COMPOSE_VERSION__ # __KOTLIN_COMPOSE_VERSION__
kotlin.version=1.6.10 kotlin.version=1.7.10
# __LATEST_COMPOSE_RELEASE_VERSION__ # __LATEST_COMPOSE_RELEASE_VERSION__
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/codeviewer/gradle.properties

@ -19,6 +19,6 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
agp.version=7.0.4 agp.version=7.0.4
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/falling-balls/gradle.properties

@ -1,3 +1,3 @@
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/imageviewer/gradle.properties

@ -19,6 +19,6 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
agp.version=7.0.4 agp.version=7.0.4
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/intellij-plugin-with-experimental-shared-base/gradle.properties

@ -1,5 +1,5 @@
kotlin.stdlib.default.dependency=false kotlin.stdlib.default.dependency=false
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/intellij-plugin/gradle.properties

@ -1,3 +1,3 @@
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/issues/gradle.properties

@ -19,6 +19,6 @@ kotlin.code.style=official
android.useAndroidX=true android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX # Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true android.enableJetifier=true
kotlin.version=1.6.10 kotlin.version=1.7.10
agp.version=7.0.4 agp.version=7.0.4
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/notepad/gradle.properties

@ -1,4 +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.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/todoapp-lite/gradle.properties

@ -19,6 +19,6 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
agp.version=7.0.4 agp.version=7.0.4
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/todoapp/gradle.properties

@ -24,5 +24,5 @@ org.gradle.caching=true
kotlin.native.disableCompilerDaemon=true kotlin.native.disableCompilerDaemon=true
#todo remove -Pkotlin.version=1.6.20 from Xcode project, when stable version on Compose with Koltin 1.6.20 or later released #todo remove -Pkotlin.version=1.6.20 from Xcode project, when stable version on Compose with Koltin 1.6.20 or later released
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/visual-effects/gradle.properties

@ -1,3 +1,3 @@
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/web-compose-bird/gradle.properties

@ -1,4 +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.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/web-landing/gradle.properties

@ -1,3 +1,3 @@
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/web-with-react/gradle.properties

@ -1,3 +1,3 @@
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
examples/widgets-gallery/gradle.properties

@ -19,6 +19,6 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02
agp.version=7.0.4 agp.version=7.0.4

2
templates/desktop-template/gradle.properties

@ -1,4 +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.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
templates/multiplatform-template/gradle.properties

@ -2,6 +2,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
kotlin.code.style=official kotlin.code.style=official
kotlin.version=1.6.10 kotlin.version=1.7.10
agp.version=7.0.4 agp.version=7.0.4
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

2
templates/web-template/gradle.properties

@ -1,4 +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.6.10 kotlin.version=1.7.10
compose.version=1.2.0-beta02 compose.version=1.2.0-beta02

36
tools/replaceVersion.sh

@ -15,11 +15,18 @@ declare -a folders=(
"tutorials" "tutorials"
) )
if [ -z "$@" ]; then if [ -z "$1" ]; then
echo "Specify Compose version. For example: ./replace.sh 1.0.0-rc6" echo "Specify Compose version. For example: ./replace.sh 1.2.0-beta02 1.7.10"
exit 1 exit 1
fi fi
COMPOSE_VERSION=$@
if [ -z "$2" ]; then
echo "Specify Kotlin version. For example: ./replace.sh 1.2.0-beta02 1.7.10"
exit 1
fi
COMPOSE_VERSION=$1
KOTLIN_VERSION=$2
if [[ $OSTYPE == 'darwin'* ]]; then if [[ $OSTYPE == 'darwin'* ]]; then
SED=gsed SED=gsed
@ -27,25 +34,26 @@ else
SED=sed SED=sed
fi fi
replaceCompose() { replaceVersion() {
$SED -i -e "s/$1/$2/g" $3 $SED -i -e "s/$1/$2/g" $3
} }
replaceComposeInFile() { replaceVersionInFile() {
echo "Replace in $1" echo "Replace in $1"
replaceCompose '^compose.version=.*' 'compose.version='"$COMPOSE_VERSION"'' $1 replaceVersion '^compose.version=.*' 'compose.version='"$COMPOSE_VERSION"'' $1
replaceCompose '^COMPOSE_CORE_VERSION=.*' 'COMPOSE_CORE_VERSION='"$COMPOSE_VERSION"'' $1 replaceVersion '^COMPOSE_CORE_VERSION=.*' 'COMPOSE_CORE_VERSION='"$COMPOSE_VERSION"'' $1
replaceCompose '^COMPOSE_WEB_VERSION=.*' 'COMPOSE_WEB_VERSION='"$COMPOSE_VERSION"'' $1 replaceVersion '^COMPOSE_WEB_VERSION=.*' 'COMPOSE_WEB_VERSION='"$COMPOSE_VERSION"'' $1
replaceCompose 'id("org.jetbrains.compose") version ".*"' 'id("org.jetbrains.compose") version "'"$COMPOSE_VERSION"'"' $1 replaceVersion '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 replaceVersion '"org.jetbrains.compose:compose-gradle-plugin:.*"' '"org.jetbrains.compose:compose-gradle-plugin:'"$COMPOSE_VERSION"'"' $1
replaceVersion '^kotlin.version=.*' 'kotlin.version='"$KOTLIN_VERSION"'' $1
} }
replaceComposeInFolder() { replaceVersionInFolder() {
find $ROOT/$1 -wholename $2 -not -path "**/build**" -not -path "**/.gradle**" | while read file; do replaceComposeInFile "$file"; done find $ROOT/$1 -wholename $2 -not -path "**/build**" -not -path "**/.gradle**" | while read file; do replaceVersionInFile "$file"; done
} }
for folder in "${folders[@]}" for folder in "${folders[@]}"
do do
replaceComposeInFolder $folder "**gradle.properties" replaceVersionInFolder $folder "**gradle.properties"
replaceComposeInFolder $folder "**README.md" replaceVersionInFolder $folder "**README.md"
done done

Loading…
Cancel
Save