Browse Source

Relocate a bundled KotlinPoet to the internal package

pull/4240/head
Konstantin 10 months ago committed by GitHub
parent
commit
84e52986dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      gradle-plugins/compose/build.gradle.kts
  2. 6
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/ResourcesTest.kt
  3. 25
      gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/app/build.gradle.kts
  4. 9
      gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/app/src/commonMain/kotlin/App.kt
  5. 4
      gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/build.gradle.kts
  6. 1
      gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/gradle.properties
  7. 24
      gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/settings.gradle.kts
  8. 2
      gradle-plugins/gradle/libs.versions.toml

2
gradle-plugins/compose/build.gradle.kts

@ -72,7 +72,7 @@ dependencies {
embedded(project(":jdk-version-probe"))
}
val packagesToRelocate = listOf("de.undercouch")
val packagesToRelocate = listOf("de.undercouch", "com.squareup.kotlinpoet")
val shadow = tasks.named<ShadowJar>("shadowJar") {
for (packageToRelocate in packagesToRelocate) {

6
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/ResourcesTest.kt

@ -222,4 +222,10 @@ class ResourcesTest : GradlePluginTestBase() {
assert(file("src/commonMain/composeResources/values/strings.xml").readLines().size == 513)
}
}
//https://github.com/gmazzo/gradle-buildconfig-plugin/issues/131
@Test
fun testBundledKotlinPoet(): Unit = with(testProject("misc/bundledKotlinPoet")) {
gradle("generateBuildConfig")
}
}

25
gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/app/build.gradle.kts

@ -0,0 +1,25 @@
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
id("com.github.gmazzo.buildconfig")
}
group = "app.group"
kotlin {
jvm()
sourceSets {
commonMain {
dependencies {
implementation(compose.runtime)
implementation(compose.material)
implementation(compose.components.resources)
}
}
}
}
buildConfig {
buildConfigField(String::class.java, "str", "")
}

9
gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/app/src/commonMain/kotlin/App.kt

@ -0,0 +1,9 @@
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import app.group.empty_res.generated.resources.Res
@Composable
fun App() {
val res = Res
Text("text")
}

4
gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/build.gradle.kts

@ -0,0 +1,4 @@
plugins {
kotlin("multiplatform").apply(false)
id("org.jetbrains.compose").apply(false)
}

1
gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/gradle.properties

@ -0,0 +1 @@
org.gradle.jvmargs=-Xmx8096M

24
gradle-plugins/compose/src/test/test-projects/misc/bundledKotlinPoet/settings.gradle.kts

@ -0,0 +1,24 @@
rootProject.name = "bundled_kp"
include(":app")
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
google()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
plugins {
id("org.jetbrains.kotlin.multiplatform").version("KOTLIN_VERSION_PLACEHOLDER")
id("org.jetbrains.compose").version("COMPOSE_GRADLE_PLUGIN_VERSION_PLACEHOLDER")
id("com.github.gmazzo.buildconfig").version("5.3.5")
}
}
dependencyResolutionManagement {
repositories {
mavenLocal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
mavenCentral()
gradlePluginPortal()
google()
}
}

2
gradle-plugins/gradle/libs.versions.toml

@ -1,7 +1,7 @@
[versions]
kotlin = "1.9.0"
gradle-download-plugin = "5.5.0"
kotlin-poet = "1.14.2"
kotlin-poet = "1.16.0"
plugin-android = "7.3.0"
shadow-jar = "8.1.1"
publish-plugin = "1.2.1"

Loading…
Cancel
Save