Skip to content

Commit 4470624

Browse files
committed
Use new plugin, desktop disabled
1 parent adeb057 commit 4470624

File tree

6 files changed

+34
-156
lines changed

6 files changed

+34
-156
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ windowSizeClass = { module = "dev.chrisbanes.material3:material3-window-size-cla
4141

4242
[plugins]
4343
androidApplication = { id = "com.android.application", version.ref = "agp" }
44+
androidLibrary = { id = "com.android.library", version.ref = "agp" }
4445
androidKmpLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
4546

4647
composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

samples/desktopApp/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
kotlin {
10-
jvm()
10+
// jvm("desktop")
1111

1212
sourceSets {
1313
jvmMain.dependencies {
@@ -16,6 +16,7 @@ kotlin {
1616
}
1717
}
1818

19+
/*
1920
compose.desktop {
2021
application {
2122
mainClass = "com.alorma.compose.settings.sample.shared.MainKt"
@@ -27,3 +28,4 @@ compose.desktop {
2728
}
2829
}
2930
}
31+
*/

samples/shared/build.gradle.kts

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ plugins {
1212
version = "1.0-SNAPSHOT"
1313

1414
kotlin {
15-
androidTarget()
16-
jvm("desktop")
15+
androidLibrary {
16+
namespace = libs.versions.namespace.get() + ".samples.shared"
17+
compileSdk = libs.versions.android.compileSdk.get().toInt()
18+
minSdk = libs.versions.android.minSdk.get().toInt()
19+
}
20+
21+
// jvm("desktop")
1722

1823
js(IR) {
1924
browser()
@@ -73,34 +78,13 @@ kotlin {
7378
}
7479
}
7580

81+
/*
7682
val desktopMain by getting
7783
desktopMain.dependencies {
7884
api(compose.desktop.currentOs)
7985
implementation(compose.desktop.common)
8086
}
81-
}
82-
}
83-
84-
android {
85-
namespace = libs.versions.namespace.get() + ".sample.shared"
86-
compileSdk =
87-
libs.versions.android.compileSdk
88-
.get()
89-
.toInt()
90-
91-
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
92-
sourceSets["main"].res.srcDirs("src/androidMain/res")
93-
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
94-
95-
defaultConfig {
96-
minSdk =
97-
libs.versions.android.minSdkSample
98-
.get()
99-
.toInt()
100-
}
101-
compileOptions {
102-
sourceCompatibility = JavaVersion.VERSION_17
103-
targetCompatibility = JavaVersion.VERSION_17
87+
*/
10488
}
10589
}
10690

ui-base/build.gradle.kts

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ kotlin {
1919

2020
withSourcesJar()
2121

22-
androidTarget {
23-
publishLibraryVariants("release")
22+
androidLibrary {
23+
namespace = libs.versions.namespace.get() + ".ui.base"
24+
compileSdk = libs.versions.android.compileSdk.get().toInt()
25+
minSdk = libs.versions.android.minSdk.get().toInt()
2426
}
2527

26-
jvm("desktop")
28+
// jvm("desktop")
2729

2830
iosX64()
2931
iosArm64()
@@ -52,47 +54,7 @@ kotlin {
5254
}
5355
}
5456

55-
android {
56-
namespace = libs.versions.namespace.get() + ".ui.base"
57-
compileSdk =
58-
libs.versions.android.compileSdk
59-
.get()
60-
.toInt()
61-
62-
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
63-
sourceSets["main"].res.srcDirs("src/androidMain/res")
64-
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
65-
66-
defaultConfig {
67-
minSdk =
68-
libs.versions.android.minSdk
69-
.get()
70-
.toInt()
71-
}
72-
73-
packaging {
74-
resources {
75-
excludes += "/META-INF/{AL2.0,LGPL2.1}"
76-
}
77-
}
78-
lint {
79-
checkReleaseBuilds = false
80-
abortOnError = false
81-
}
82-
buildTypes {
83-
getByName("release") {
84-
isMinifyEnabled = false
85-
}
86-
}
87-
compileOptions {
88-
sourceCompatibility = JavaVersion.VERSION_17
89-
targetCompatibility = JavaVersion.VERSION_17
90-
}
91-
dependencies {
92-
debugImplementation(compose.uiTooling)
93-
}
94-
}
95-
57+
/*
9658
compose.desktop {
9759
application {
9860
nativeDistributions {
@@ -102,6 +64,7 @@ compose.desktop {
10264
}
10365
}
10466
}
67+
*/
10568

10669
dependencies {
10770
detektPlugins(libs.compose.detekt.rules)

ui-tiles-extended/build.gradle.kts

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ kotlin {
1919

2020
withSourcesJar()
2121

22-
androidTarget {
23-
publishLibraryVariants("release")
22+
androidLibrary {
23+
namespace = libs.versions.namespace.get() + ".ui.extended"
24+
compileSdk = libs.versions.android.compileSdk.get().toInt()
25+
minSdk = libs.versions.android.minSdk.get().toInt()
2426
}
2527

26-
jvm("desktop")
28+
// jvm("desktop")
2729

2830
iosX64()
2931
iosArm64()
@@ -54,46 +56,7 @@ kotlin {
5456
}
5557
}
5658

57-
android {
58-
namespace = libs.versions.namespace.get() + ".ui.extended"
59-
compileSdk =
60-
libs.versions.android.compileSdk
61-
.get()
62-
.toInt()
63-
64-
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
65-
sourceSets["main"].res.srcDirs("src/androidMain/res")
66-
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
67-
68-
defaultConfig {
69-
minSdk =
70-
libs.versions.android.minSdk
71-
.get()
72-
.toInt()
73-
}
74-
packaging {
75-
resources {
76-
excludes += "/META-INF/{AL2.0,LGPL2.1}"
77-
}
78-
}
79-
lint {
80-
checkReleaseBuilds = false
81-
abortOnError = false
82-
}
83-
buildTypes {
84-
getByName("release") {
85-
isMinifyEnabled = false
86-
}
87-
}
88-
compileOptions {
89-
sourceCompatibility = JavaVersion.VERSION_17
90-
targetCompatibility = JavaVersion.VERSION_17
91-
}
92-
dependencies {
93-
debugImplementation(compose.uiTooling)
94-
}
95-
}
96-
59+
/*
9760
compose.desktop {
9861
application {
9962
nativeDistributions {
@@ -103,6 +66,7 @@ compose.desktop {
10366
}
10467
}
10568
}
69+
*/
10670

10771
dependencies {
10872
detektPlugins(libs.compose.detekt.rules)

ui-tiles/build.gradle.kts

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ kotlin {
1919

2020
withSourcesJar()
2121

22-
androidTarget {
23-
publishLibraryVariants("release")
22+
androidLibrary {
23+
namespace = libs.versions.namespace.get() + ".ui"
24+
compileSdk = libs.versions.android.compileSdk.get().toInt()
25+
minSdk = libs.versions.android.minSdk.get().toInt()
2426
}
2527

26-
jvm("desktop")
28+
// jvm("desktop")
2729

2830
iosX64()
2931
iosArm64()
@@ -54,46 +56,7 @@ kotlin {
5456
}
5557
}
5658

57-
android {
58-
namespace = libs.versions.namespace.get() + ".ui"
59-
compileSdk =
60-
libs.versions.android.compileSdk
61-
.get()
62-
.toInt()
63-
64-
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
65-
sourceSets["main"].res.srcDirs("src/androidMain/res")
66-
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
67-
68-
defaultConfig {
69-
minSdk =
70-
libs.versions.android.minSdk
71-
.get()
72-
.toInt()
73-
}
74-
packaging {
75-
resources {
76-
excludes += "/META-INF/{AL2.0,LGPL2.1}"
77-
}
78-
}
79-
lint {
80-
checkReleaseBuilds = false
81-
abortOnError = false
82-
}
83-
buildTypes {
84-
getByName("release") {
85-
isMinifyEnabled = false
86-
}
87-
}
88-
compileOptions {
89-
sourceCompatibility = JavaVersion.VERSION_17
90-
targetCompatibility = JavaVersion.VERSION_17
91-
}
92-
dependencies {
93-
debugImplementation(compose.uiTooling)
94-
}
95-
}
96-
59+
/*
9760
compose.desktop {
9861
application {
9962
nativeDistributions {
@@ -103,6 +66,7 @@ compose.desktop {
10366
}
10467
}
10568
}
69+
*/
10670

10771
dependencies {
10872
detektPlugins(libs.compose.detekt.rules)

0 commit comments

Comments
 (0)