Skip to content

Commit

Permalink
CHG from gradle to kotlin dsl
Browse files Browse the repository at this point in the history
  • Loading branch information
rafi0101 committed Jan 16, 2024
1 parent f300a5e commit a2b54b8
Show file tree
Hide file tree
Showing 8 changed files with 246 additions and 230 deletions.
86 changes: 0 additions & 86 deletions app/build.gradle

This file was deleted.

86 changes: 86 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("com.google.devtools.ksp")
}

android {

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

defaultConfig {
applicationId = "de.raphaelebner.roomdatabasebackup.sample"
minSdk = 21
targetSdk = 34
compileSdk = 34
buildToolsVersion = "34.0.0"
versionCode = 1
versionName = "1.0.3"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
arg("room.expandProjection", "true")
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

buildFeatures {
viewBinding = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
namespace = "de.raphaelebner.roomdatabasebackup.sample"
}

dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation(project(":core"))
implementation("androidx.legacy:legacy-support-v4:1.0.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

//ROOM SQLite
val roomVersion = "2.6.1"

implementation("androidx.room:room-runtime:$roomVersion")
ksp("androidx.room:room-compiler:$roomVersion")

// optional - Kotlin Extensions and Coroutines support for Room
implementation("androidx.room:room-ktx:$roomVersion")

// optional - RxJava support for Room
implementation("androidx.room:room-rxjava2:$roomVersion")

implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")

// optional - Guava support for Room, including Optional and ListenableFuture
implementation("androidx.room:room-guava:$roomVersion")

// Test helpers
testImplementation("androidx.room:room-testing:$roomVersion")

//Recyclerview Implementation
implementation("androidx.recyclerview:recyclerview:1.3.2")

//Material Design Implementation
implementation("com.google.android.material:material:1.11.0")

}
22 changes: 14 additions & 8 deletions build.gradle → build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.9.10'
extra.set("kotlin_version", "1.9.10")
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
val kotlinVersion = rootProject.extra.get("kotlin_version")
classpath("com.android.tools.build:gradle:8.2.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id('io.github.gradle-nexus.publish-plugin') version "1.3.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1"
id("org.jetbrains.dokka") version "1.9.10"
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
}

apply from: "${rootDir}/scripts/publish-root.gradle"

apply {
from("${rootDir}/scripts/publish-root.gradle")
}



allprojects {
repositories {
Expand All @@ -30,6 +36,6 @@ allprojects {
}
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
100 changes: 0 additions & 100 deletions core/build.gradle

This file was deleted.

Loading

0 comments on commit a2b54b8

Please sign in to comment.