Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
101 lines (87 loc) · 3.2 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
101 lines (87 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.plugin.compose")
id("com.itsaky.androidide.plugins.build")
}
pluginBuilder {
pluginName = "jetpack-compose-preview"
}
android {
namespace = "org.appdevforall.composepreview"
compileSdk = 36
defaultConfig {
applicationId = "org.appdevforall.composepreview"
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "1.0.0"
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
}
}
buildTypes {
release {
isMinifyEnabled = false
isShrinkResources = false
signingConfig = signingConfigs.getByName("debug")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
viewBinding = true
}
// Keep the bundled on-device Compose toolchain archive uncompressed inside the .cgp.
androidResources {
noCompress += "zip"
}
packaging {
resources {
excludes += setOf(
"META-INF/DEPENDENCIES",
"META-INF/LICENSE",
"META-INF/LICENSE.txt",
"META-INF/NOTICE",
"META-INF/NOTICE.txt",
"META-INF/INDEX.LIST",
"META-INF/*.kotlin_module"
)
}
}
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
dependencies {
// Host provides plugin-api implementations at runtime; the plugin links only against
// the stable plugin-api contract — never host-internal modules.
compileOnly(files("../../libs/plugin-api.jar"))
// Compose is BUNDLED into the .cgp because the host no longer ships it after extraction.
val composeBom = platform("androidx.compose:compose-bom:2024.02.00")
implementation(composeBom)
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.foundation:foundation")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.runtime:runtime")
implementation("androidx.activity:activity-compose:1.8.2")
implementation("androidx.fragment:fragment-ktx:1.8.8")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
implementation("com.google.android.material:material:1.10.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("org.slf4j:slf4j-nop:1.7.36")
debugImplementation(composeBom)
debugImplementation("androidx.compose.ui:ui-tooling")
}