Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- IntelliJ
- react
- Eclipse
- Kotlin
- mybatis
- tomcat
- vaadin
- Sqoop
- SQL
- Spring
- SSL
- table
- 공정능력
- Android
- R
- NPM
- xPlatform
- es6
- SPC
- MSSQL
- plugin
- hadoop
- mapreduce
- 보조정렬
- Python
- JavaScript
- window
- GIT
- Java
- Express
Archives
- Today
- Total
DBILITY
android migration kapt to ksp 본문
반응형
https://kotlinlang.org/docs/kapt.html#try-kotlin-k2-compiler
https://developer.android.com/build/migrate-to-ksp?hl=ko
kapt는 the Kotlin Annotation Processing Tool의 약자로 Kotlin에서 Java Annotation Processor를 사용하여 Annotation들을 사용할 수 있도록 해준다.
ksp는 Kotlin Symbol Processing의 약자로 kotlin으로 작성되었으며 kapt와 같은 역할이지만 Kotlin 코드를 직접 분석하기 때문에 빌드 속도가 매우 빠르다.
kotlin 버전을 맞춰야 한다고
room을 사용할때 처음 써봤다.
둘다 해보니 그냥 모르겠다^^
libs.versions.toml (Version Catalog)
[versions]
agp = "8.3.1"
kotlin = "1.9.0"
coreKtx = "1.12.0"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.11.0"
activity = "1.8.2"
constraintlayout = "2.1.4"
room = "2.6.1"
#kapt = "1.9.0"
ksp="1.9.0-1.0.13"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
androidx-room = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
androidx-room-comfiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
#jetbrainsKotlinKapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kapt" }
jetbrainsKotlinKsp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
build.gradle.kts(Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
//alias(libs.plugins.jetbrainsKotlinKapt) apply false
alias(libs.plugins.jetbrainsKotlinKsp) apply false
}
build.gradle.kts(Module)
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
//alias(libs.plugins.jetbrainsKotlinKapt)
alias(libs.plugins.jetbrainsKotlinKsp)
}
android {
namespace = "com.dbility.myroom"
compileSdk = 34
defaultConfig {
applicationId = "com.dbility.myroom"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.room)
ksp(libs.androidx.room.comfiler)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
반응형
'android > kotlin' 카테고리의 다른 글
android room database (0) | 2024.03.29 |
---|---|
android viewmodel 에서 constructor arguments (0) | 2024.03.29 |
안드로이드 SQLiteOpenHelper 구현 (0) | 2024.03.28 |
안드로이드 internal directory file read ,write (0) | 2024.03.26 |
안드로이드 CalendarView selected date (0) | 2024.03.26 |
Comments