Skip to content

Commit

Permalink
Release 1.9.0-1.1.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyhuo committed Aug 8, 2024
1 parent ad25931 commit 6aabdad
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 32 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.9.20" apply false
kotlin("jvm") version "1.9.0" apply false
id("org.jetbrains.dokka") version "1.7.10" apply false
id("com.github.gmazzo.buildconfig") version "2.1.0" apply false
id("com.vanniktech.maven.publish") version "0.22.0" apply false
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kotlin.code.style=official

VERSION_NAME=1.9.20-1.1.3
VERSION_NAME=1.9.0-1.1.3

GROUP=com.bennyhuo.kotlin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class IrSourcePrinterExtension : IrGenerationExtension {
val indent = Options.indent().takeIf { it.isNotEmpty() } ?: " "

moduleFragment.files.forEach { irFile ->
outputDir.resolve(irFile.packageFqName.asString().replace('.', File.separatorChar)).run {
outputDir.resolve(irFile.fqName.asString().replace('.', File.separatorChar)).run {
mkdirs()
val source = when (Options.outputType()) {
OUTPUT_TYPE_KOTLIN_LIKE_JC -> irFile.dumpSrc(indent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ internal class JcIrSourcePrinter(
}

override fun visitPackageFragment(declaration: IrPackageFragment) {
if (declaration.packageFqName != FqName.ROOT) {
println("package ${declaration.packageFqName.asString()}")
if (declaration.fqName != FqName.ROOT) {
println("package ${declaration.fqName.asString()}")
println()
}
}
Expand Down Expand Up @@ -1458,7 +1458,7 @@ internal class JcIrSourcePrinter(
if (parent is IrDeclaration) {
parent.renderDeclarationFqn(sb)
} else if (parent is IrPackageFragment) {
sb.append(parent.packageFqName.toString())
sb.append(parent.fqName.toString())
}
} catch (e: UninitializedPropertyAccessException) {
sb.append("<uninitialized parent>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class KonanConfig(val project: Project) {
project.file("${konanHome}/konan/konan.properties").inputStream().use(::load)
}

val dependenciesRoot: File = DependencyDirectories.getDependenciesRoot(project.konanDataDir)
val dependenciesRoot: File = DependencyDirectories.defaultDependenciesRoot

val llvmHome: File = File(
dependenciesRoot,
Expand Down
2 changes: 1 addition & 1 deletion sample/android-sample/compose-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.5"
kotlinCompilerExtensionVersion = "1.5.2"
}
packaging {
resources {
Expand Down
6 changes: 3 additions & 3 deletions sample/android-sample/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
agp = "8.3.0"
kotlin = "1.9.20"
ksp = "1.9.20-1.0.14"
kotlin = "1.9.0"
ksp = "1.9.0-1.0.11"
coreKtx = "1.10.1"
junit = "4.13.2"
junitVersion = "1.1.5"
Expand All @@ -10,7 +10,7 @@ lifecycleRuntimeKtx = "2.6.1"
activity = "1.7.0"
activityCompose = "1.7.0"
composeBom = "2023.08.00"
room = "2.6.0"
room = "2.5.2"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand Down
37 changes: 26 additions & 11 deletions sample/kmp-sample/composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsCompose)
id("com.bennyhuo.kotlin.ir.printer") version "1.9.20-1.0.3"
id("com.bennyhuo.kotlin.ir.printer") version "1.9.0-1.0.3"
}

kotlin {
Expand All @@ -31,18 +31,33 @@ kotlin {

sourceSets {

androidMain.dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
val androidMain by getting {
dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
}
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)

val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
}
}

val iosMain by creating
iosMain.dependsOn(commonMain)

val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
iosX64Main.dependsOn(iosMain)
iosArm64Main.dependsOn(iosMain)
iosSimulatorArm64Main.dependsOn(iosMain)
}
}

Expand Down
6 changes: 0 additions & 6 deletions sample/kmp-sample/composeApp/src/commonMain/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.ui.tooling.preview.Preview

import kmpcomposesample.composeapp.generated.resources.Res
import kmpcomposesample.composeapp.generated.resources.compose_multiplatform
import kotlin.jvm.JvmInline

@Composable
@Preview
fun App() {
MaterialTheme {
var showContent by remember { mutableStateOf(false) }
Expand All @@ -27,7 +22,6 @@ fun App() {
AnimatedVisibility(showContent) {
val greeting = remember { Greeting().greet() }
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
Image(painterResource(Res.drawable.compose_multiplatform), null)
Text("Compose: $greeting")
}
}
Expand Down
4 changes: 3 additions & 1 deletion sample/kmp-sample/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ android.useAndroidX=true

#MPP
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.enableCInteropCommonization=true

org.jetbrains.compose.experimental.uikit.enabled=true
6 changes: 3 additions & 3 deletions sample/kmp-sample/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ android-compileSdk = "34"
android-minSdk = "24"
android-targetSdk = "34"
androidx-activityCompose = "1.9.0"
androidx-appcompat = "1.6.1"
androidx-appcompat = "1.6.0"
androidx-constraintlayout = "2.1.4"
androidx-core-ktx = "1.13.1"
androidx-espresso-core = "3.5.1"
androidx-material = "1.12.0"
androidx-test-junit = "1.1.5"
compose-plugin = "1.6.10"
compose-plugin = "1.5.0"
junit = "4.13.2"
kotlin = "1.9.20"
kotlin = "1.9.0"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
Expand Down

0 comments on commit 6aabdad

Please sign in to comment.