From cb5ecd71316d784e48cc7ec870276fee69f67cf2 Mon Sep 17 00:00:00 2001 From: nabilasuwandira <202310715066@mhs.ubharajaya.ac.id> Date: Fri, 7 Nov 2025 13:54:58 +0700 Subject: [PATCH] gradle --- app/build.gradle.kts | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 app/build.gradle.kts diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..76daba5 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,77 @@ + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + // 1. TAMBAHKAN PLUGIN COMPOSE COMPILER DI SINI + alias(libs.plugins.compose.compiler) +} + +android { + namespace = "com.example.kalkulatorbmi" + compileSdk = 36 + + defaultConfig { + applicationId = "com.example.kalkulatorbmi" + minSdk = 24 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary = true + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + buildFeatures { + // 2. AKTIFKAN COMPOSE DI SINI (INI MASIH DIPERLUKAN) + compose = true + } + // 3. HAPUS BLOK composeOptions YANG LAMA + // composeOptions { + // kotlinCompilerExtensionVersion = "1.5.11" // <- HAPUS BLOK INI + // } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } +} + +dependencies { + // Dependensi lain tetap sama... + implementation(libs.androidx.core.ktx) + implementation(platform("androidx.compose:compose-bom:2024.05.00")) + implementation("androidx.compose.ui:ui") + implementation("androidx.compose.ui:ui-graphics") + implementation("androidx.compose.ui:ui-tooling-preview") + implementation("androidx.compose.material3:material3") + implementation("androidx.activity:activity-compose:1.9.0") + implementation("androidx.navigation:navigation-compose:2.7.7") + implementation(libs.androidx.constraintlayout) + implementation("androidx.compose.material:material-icons-extended") + // Dependensi untuk pengujian + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(platform("androidx.compose:compose-bom:2024.05.00")) + androidTestImplementation("androidx.compose.ui:ui-test-junit4") + debugImplementation("androidx.compose.ui:ui-tooling") + debugImplementation("androidx.compose.ui:ui-test-manifest") +}