Skip to content

Commit

Permalink
Merge pull request #187 from elimu-ai/build/enable_kotlin
Browse files Browse the repository at this point in the history
Enable Kotlin for app and utils module
  • Loading branch information
tuancoltech authored Mar 3, 2025
2 parents ece8105 + c345e7f commit a44aaab
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'

android {
compileSdk 35
Expand Down Expand Up @@ -35,6 +36,9 @@ android {
buildFeatures {
buildConfig = true
}
kotlinOptions {
jvmTarget = '17'
}
}

dependencies {
Expand All @@ -59,6 +63,7 @@ dependencies {

// Room components
implementation 'androidx.room:room-runtime:2.4.2'
implementation 'androidx.core:core-ktx:1.15.0'
annotationProcessor 'androidx.room:room-compiler:2.4.2'
androidTestImplementation 'androidx.room:room-testing:2.4.2'

Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
kotlin_version = '2.1.10'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.1'

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
11 changes: 8 additions & 3 deletions utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'maven-publish'
id 'org.jetbrains.kotlin.android'
}

android {
Expand All @@ -20,13 +21,17 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
}

dependencies {
implementation 'com.github.elimu-ai:model:model-2.0.83' // See https://jitpack.io/#elimu-ai/model
implementation 'com.github.elimu-ai:model:model-2.0.83'
implementation 'androidx.core:core-ktx:1.15.0'// See https://jitpack.io/#elimu-ai/model
testImplementation 'junit:junit:4.13.2'
}

Expand Down

0 comments on commit a44aaab

Please sign in to comment.