mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
Modify replace.sh for replacing Compose version (#1511)
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 version
This commit is contained in:
@@ -3,11 +3,8 @@ import kotlinx.benchmark.gradle.*
|
||||
import org.jetbrains.kotlin.allopen.gradle.*
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.4.20"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version "0.2.0-build132"
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("plugin.allopen") version "1.4.20"
|
||||
id("kotlinx.benchmark") version "0.3.0"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
compose.version=1.0.0
|
||||
kotlin.code.style=official
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
buildscript {
|
||||
val composeVersion = property("compose.version")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:$composeVersion")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
version = findProperty("deploy.version") ?: property("compose.version")!!
|
||||
|
||||
|
||||
@@ -2,6 +2,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
kotlin.code.style=official
|
||||
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
@@ -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:demo")
|
||||
@@ -1,20 +1,3 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0")
|
||||
classpath("com.android.tools.build:gradle:4.2.2")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -19,3 +19,6 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
agp.version=4.2.2
|
||||
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")
|
||||
|
||||
@@ -3,8 +3,8 @@ import org.jetbrains.compose.compose
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
2
examples/falling-balls-web/gradle.properties
Normal file
2
examples/falling-balls-web/gradle.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
@@ -2,10 +2,14 @@ pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version(extra["kotlin.version"] as String)
|
||||
id("org.jetbrains.compose").version(extra["compose.version"] as String)
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "falling_balls_with_web"
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package org.jetbrains.compose.common.demo
|
||||
|
||||
import androidx.compose.desktop.Window
|
||||
import androidx.compose.ui.unit.IntSize
|
||||
import org.jetbrains.compose.demo.falling.views.fallingBalls
|
||||
import org.jetbrains.compose.demo.falling.Game
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.window.singleWindowApplication
|
||||
import org.jetbrains.compose.demo.falling.Game
|
||||
import org.jetbrains.compose.demo.falling.views.fallingBalls
|
||||
|
||||
class JvmGame : Game() {
|
||||
override fun now() = System.nanoTime()
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Window(title = "Demo", size = IntSize(600, 400)) {
|
||||
singleWindowApplication(title = "Demo") {
|
||||
fallingBalls(
|
||||
remember {
|
||||
JvmGame().apply {
|
||||
|
||||
@@ -2,11 +2,11 @@ package org.jetbrains.compose.common.demo
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import org.jetbrains.compose.common.ui.Modifier
|
||||
import org.jetbrains.compose.common.foundation.layout.offset
|
||||
import org.jetbrains.compose.common.ui.unit.Dp
|
||||
import org.jetbrains.compose.common.internal.castOrCreate
|
||||
import org.jetbrains.compose.common.ui.unit.implementation
|
||||
import androidx.compose.foundation.layout.offset
|
||||
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
|
||||
|
||||
@Composable
|
||||
@OptIn(ExperimentalComposeWebWidgetsApi::class)
|
||||
|
||||
@@ -3,10 +3,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
group = "me.user"
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
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"
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0")
|
||||
classpath("com.android.tools.build:gradle:4.1.0")
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -19,3 +19,6 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
agp.version=4.2.2
|
||||
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")
|
||||
|
||||
@@ -3,9 +3,8 @@ import org.jetbrains.compose.compose
|
||||
plugins {
|
||||
id("org.jetbrains.intellij") version "1.1.4"
|
||||
java
|
||||
kotlin("jvm") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose")
|
||||
id("idea")
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
rootProject.name = "ComposeDemoPlugin"
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
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)
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,3 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0")
|
||||
classpath("com.android.tools.build:gradle:4.1.3")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
||||
@@ -19,3 +19,6 @@ kotlin.code.style=official
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
kotlin.version=1.5.31
|
||||
agp.version=4.2.2
|
||||
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")
|
||||
|
||||
@@ -2,10 +2,8 @@ import org.jetbrains.compose.compose
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version ("1.0.0")
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
|
||||
@@ -3,4 +3,9 @@ pluginManagement {
|
||||
gradlePluginPortal()
|
||||
maven("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)
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,3 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0")
|
||||
classpath("com.android.tools.build:gradle:4.1.0")
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -19,3 +19,6 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
agp.version=4.2.2
|
||||
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")
|
||||
|
||||
@@ -10,8 +10,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(Deps.JetBrains.Compose.gradlePlugin)
|
||||
implementation(Deps.JetBrains.Kotlin.gradlePlugin)
|
||||
implementation(Deps.JetBrains.Compose(project).gradlePlugin)
|
||||
implementation(Deps.JetBrains.Kotlin(project).gradlePlugin)
|
||||
implementation(Deps.Android.Tools.Build.gradlePlugin)
|
||||
implementation(Deps.Squareup.SQLDelight.gradlePlugin)
|
||||
}
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
object Deps {
|
||||
|
||||
// We store Kotlin and Compose versions in gradle.properties to
|
||||
// be able to override them on CI.
|
||||
// You probably won't need this, so you can get rid of `project` in this file.
|
||||
import org.gradle.api.Project
|
||||
|
||||
object Deps {
|
||||
object JetBrains {
|
||||
object Kotlin {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
private const val VERSION = "1.5.31"
|
||||
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$VERSION"
|
||||
const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$VERSION"
|
||||
const val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:$VERSION"
|
||||
const val testJs = "org.jetbrains.kotlin:kotlin-test-js:$VERSION"
|
||||
const val testAnnotationsCommon = "org.jetbrains.kotlin:kotlin-test-annotations-common:$VERSION"
|
||||
class Kotlin(private val project: Project) {
|
||||
private val VERSION = project.properties["kotlin.version"]
|
||||
val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$VERSION"
|
||||
val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$VERSION"
|
||||
val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:$VERSION"
|
||||
val testJs = "org.jetbrains.kotlin:kotlin-test-js:$VERSION"
|
||||
val testAnnotationsCommon = "org.jetbrains.kotlin:kotlin-test-annotations-common:$VERSION"
|
||||
}
|
||||
|
||||
object Compose {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
private const val VERSION = "1.0.0"
|
||||
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
|
||||
class Compose(private val project: Project) {
|
||||
private val VERSION = project.properties["compose.version"]
|
||||
val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
examples/todoapp/buildSrc/gradle.properties
Executable file
2
examples/todoapp/buildSrc/gradle.properties
Executable file
@@ -0,0 +1,2 @@
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
@@ -15,24 +15,24 @@ kotlin {
|
||||
sourceSets {
|
||||
named("commonTest") {
|
||||
dependencies {
|
||||
implementation(Deps.JetBrains.Kotlin.testCommon)
|
||||
implementation(Deps.JetBrains.Kotlin.testAnnotationsCommon)
|
||||
implementation(Deps.JetBrains.Kotlin(project).testCommon)
|
||||
implementation(Deps.JetBrains.Kotlin(project).testAnnotationsCommon)
|
||||
}
|
||||
}
|
||||
|
||||
named("androidTest") {
|
||||
dependencies {
|
||||
implementation(Deps.JetBrains.Kotlin.testJunit)
|
||||
implementation(Deps.JetBrains.Kotlin(project).testJunit)
|
||||
}
|
||||
}
|
||||
named("desktopTest") {
|
||||
dependencies {
|
||||
implementation(Deps.JetBrains.Kotlin.testJunit)
|
||||
implementation(Deps.JetBrains.Kotlin(project).testJunit)
|
||||
}
|
||||
}
|
||||
named("jsTest") {
|
||||
dependencies {
|
||||
implementation(Deps.JetBrains.Kotlin.testJs)
|
||||
implementation(Deps.JetBrains.Kotlin(project).testJs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
group = "me.user"
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
@@ -1,10 +1,13 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
||||
maven("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,8 +1,8 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
group = "com.theapache64.composebird"
|
||||
version = "1.0.0-alpha01"
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
kotlin.code.style=official
|
||||
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 {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
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"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
|
||||
@@ -2,10 +2,14 @@ pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version(extra["kotlin.version"] as String)
|
||||
id("org.jetbrains.compose").version(extra["compose.version"] as String)
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "compose-web-lp"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:1.0.0")
|
||||
classpath("com.android.tools.build:gradle:4.2.0")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -19,3 +19,6 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
agp.version=4.2.2
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -20,9 +20,7 @@ function mavenDep {
|
||||
|
||||
PLATFORM=macos-x64
|
||||
SKIKO_VERSION=0.2.33
|
||||
# __KOTLIN_COMPOSE_VERSION__
|
||||
KOTLIN_VERSION=1.5.0
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
COMPOSE_VERSION=0.4.0-build209
|
||||
COROUTINES_VERSION=1.3.6
|
||||
COLLECTIONS_VERSION=0.3
|
||||
|
||||
@@ -4,9 +4,7 @@ import de.undercouch.gradle.tasks.download.Download
|
||||
import kotlin.text.capitalize
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.21"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version "1.0.0-alpha1"
|
||||
id("de.undercouch.download") version "4.1.1"
|
||||
application
|
||||
|
||||
@@ -9,7 +9,6 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:$composeVersion")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,4 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
kotlin.code.style=official
|
||||
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
compose.version=1.0.0
|
||||
|
||||
@@ -2,10 +2,8 @@ import org.jetbrains.compose.compose
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0")
|
||||
id("org.jetbrains.compose") version "1.0.0"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import com.gradle.publish.PluginBundleExtension
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.10" apply false
|
||||
id("com.gradle.plugin-publish") version "0.17.0" apply false
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ package org.jetbrains.compose.test
|
||||
|
||||
@Suppress("EnumEntryName")
|
||||
enum class TestKotlinVersion(val versionString: String) {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
Default("1.5.31"),
|
||||
V1_5_20("1.5.20")
|
||||
}
|
||||
@@ -5,7 +5,6 @@ kotlin.code.style=official
|
||||
# that will be used by published Gradle plugin,
|
||||
# unless overridden by COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION env var.
|
||||
#
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
compose.version=1.0.0
|
||||
compose.with.web=false
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ buildscript {
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
dependencies {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:0.0.9-preview-images")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,8 @@ import org.jetbrains.compose.compose
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("jvm") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0")
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
@@ -3,4 +3,9 @@ pluginManagement {
|
||||
gradlePluginPortal()
|
||||
maven("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)
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
|
||||
@@ -1,21 +1,3 @@
|
||||
buildscript {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "1.0.0"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.compose:compose-gradle-plugin:$composeVersion")
|
||||
classpath("com.android.tools.build:gradle:4.1.3")
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
classpath(kotlin("gradle-plugin", version = "1.5.31"))
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -2,3 +2,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
agp.version=4.2.2
|
||||
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")
|
||||
|
||||
@@ -3,10 +3,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
|
||||
plugins {
|
||||
// __KOTLIN_COMPOSE_VERSION__
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
id("org.jetbrains.compose") version ("1.0.0")
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.5.31
|
||||
compose.version=1.0.0
|
||||
@@ -3,4 +3,9 @@ pluginManagement {
|
||||
gradlePluginPortal()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version(extra["kotlin.version"] as String)
|
||||
id("org.jetbrains.compose").version(extra["compose.version"] as String)
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,51 @@
|
||||
#!/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 )"/..
|
||||
COMPOSE_OLDVER=0.4.0-rc2
|
||||
COMPOSE_NEWVER=0.4.0
|
||||
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$COMPOSE_OLDVER/$COMPOSE_NEWVER/g" {} \;
|
||||
APPCOMPAT_OLDVER=1.1.0
|
||||
APPCOMPAT_NEWVER=1.3.0-beta01
|
||||
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$APPCOMPAT_OLDVER/$APPCOMPAT_NEWVER/g" {} \;
|
||||
KOTLIN_OLDVER=1.5.10
|
||||
KOTLIN_NEWVER=1.5.10
|
||||
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$KOTLIN_OLDVER/$KOTLIN_NEWVER/g" {} \;
|
||||
git grep -C 1 __KOTLIN_COMPOSE_VERSION__ $ROOT
|
||||
git grep -C 1 __LATEST_COMPOSE_RELEASE_VERSION__ $ROOT
|
||||
|
||||
# Add folders which should contain up-to-date versions
|
||||
declare -a folders=(
|
||||
"templates"
|
||||
"examples"
|
||||
"gradle-plugins"
|
||||
"components"
|
||||
"ci"
|
||||
"web"
|
||||
"tutorials"
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
@@ -40,7 +40,7 @@ just search for "Compose Multiplatform".
|
||||
|
||||
### Update the wizard plugin
|
||||
|
||||
The Compose plugin version used in the wizard above may be not the last. Update the version of the plugin to the latest available by editing the `build.gradle.kts` file, finding and updating the version information as shown below. In this example the latest version of the plugin was 1.0.0 and a compatible version of kotlin was 1.5.31. For the latest versions, see the [latest versions](https://github.com/JetBrains/compose-jb/releases) site and the [Kotlin](https://kotlinlang.org/) site.
|
||||
The Compose plugin version used in the wizard above may be not the last. Update the version of the plugin to the latest available by editing the `build.gradle.kts` file, finding and updating the version information as shown below. For the latest versions, see the [latest versions](https://github.com/JetBrains/compose-jb/releases) site and the [Kotlin](https://kotlinlang.org/) site.
|
||||
```
|
||||
plugins {
|
||||
kotlin("jvm") version "1.5.31"
|
||||
|
||||
@@ -50,18 +50,31 @@ fun cloneTemplate(template: String, index: Int, content: String): File {
|
||||
return tempDir
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun checkDirs(dirs: List<String>, template: String, buildCmd: String = "build") {
|
||||
val snippets = findSnippets(dirs)
|
||||
snippets.forEachIndexed { index, snippet ->
|
||||
println("process snippet $index at ${snippet.file}:${snippet.lineNumber} with $template")
|
||||
snippet.tempDir = cloneTemplate(template, index, snippet.content)
|
||||
val isWin = System.getProperty("os.name").startsWith("Win")
|
||||
val procBuilder = if (isWin) {
|
||||
ProcessBuilder("gradlew.bat", "$buildCmd")
|
||||
val args = buildList {
|
||||
if (isWin) {
|
||||
add("gradlew.bat")
|
||||
} else {
|
||||
ProcessBuilder("bash", "./gradlew", "$buildCmd")
|
||||
add("bash")
|
||||
add("./gradlew")
|
||||
}
|
||||
val proc = procBuilder
|
||||
|
||||
add(buildCmd)
|
||||
|
||||
project.findProperty("kotlin.version")?.also {
|
||||
add("-Pkotlin.version=$it")
|
||||
}
|
||||
project.findProperty("compose.version")?.also {
|
||||
add("-Pcompose.version=$it")
|
||||
}
|
||||
}
|
||||
val proc = ProcessBuilder(*args.toTypedArray())
|
||||
.directory(snippet.tempDir)
|
||||
.redirectOutput(ProcessBuilder.Redirect.PIPE)
|
||||
.redirectError(ProcessBuilder.Redirect.PIPE)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
RUN from project root directory:
|
||||
`./gradlew :compose-compiler-integration:checkComposeCases`
|
||||
|
||||
|
||||
To use specific version (the default is 0.0.0-SNASPHOT):
|
||||
`./gradlew :compose-compiler-integration:checkComposeCases -PCOMPOSE_CORE_VERSION=0.5.0-build243`
|
||||
To use specific version:
|
||||
`./gradlew :compose-compiler-integration:checkComposeCases -PCOMPOSE_CORE_VERSION=1.0.0 -PCOMPOSE_WEB_VERSION=1.0.0
|
||||
|
||||
To fun only filtered cases (check for contained in file path):
|
||||
`./gradlew :compose-compiler-integration:checkComposeCases -PFILTER_CASES=CaseName`
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
COMPOSE_CORE_VERSION=1.0.0
|
||||
COMPOSE_WEB_VERSION=1.0.0
|
||||
compose.web.buildSamples=false
|
||||
|
||||
Reference in New Issue
Block a user