Skip to content

Commit

Permalink
Update build.gradle files to gradle.kts (#422)
Browse files Browse the repository at this point in the history
* Move library/build.gradle to kts

* Move sample/build.gradle to kts

* Move root build.gradle to kts

* Fix compile arg

* Remove proguard files
  • Loading branch information
alorma authored Jun 8, 2021
1 parent 5922d2a commit 43285c4
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 153 deletions.
29 changes: 0 additions & 29 deletions build.gradle

This file was deleted.

21 changes: 21 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32")
}
}

allprojects {
repositories {
google()
mavenCentral()
}
}

task<Delete>("clean") {
setDelete(rootProject.buildDir)
}
38 changes: 0 additions & 38 deletions library/build.gradle

This file was deleted.

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

apply(from= "../config/android-quality.gradle")

android {
compileSdk = 30

defaultConfig {
minSdk = 19
targetSdk = 30
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
disable.add("InvalidPackage")
}
}

dependencies {
api("androidx.test.espresso:espresso-core:3.1.1")
api("androidx.test.espresso:espresso-contrib:3.1.1")
api("androidx.test.uiautomator:uiautomator:2.2.0")
api("androidx.test.espresso:espresso-intents:3.1.1")

implementation("androidx.annotation:annotation:1.0.2")
implementation("androidx.legacy:legacy-support-core-ui:1.0.0")
implementation("androidx.vectordrawable:vectordrawable-animated:1.0.0")
implementation("androidx.recyclerview:recyclerview:1.0.0")
api("androidx.viewpager2:viewpager2:1.0.0")

implementation("com.google.android.material:material:1.2.0")

testImplementation("junit:junit:4.12")
testImplementation("pl.pragmatists:JUnitParams:1.1.0")
testImplementation("org.assertj:assertj-core:1.7.0")
testImplementation("org.mockito:mockito-core:2.28.2")
}
17 changes: 0 additions & 17 deletions library/proguard-rules.pro

This file was deleted.

52 changes: 0 additions & 52 deletions sample/build.gradle

This file was deleted.

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

apply(from = "../config/android-quality.gradle")

android {
compileSdk = 30

defaultConfig {
minSdk = 19
targetSdk = 30

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["clearPackageData"] = "true"

vectorDrawables.useSupportLibrary = true
}

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

testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
}

dependencies {
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.appcompat:appcompat:1.0.2")
implementation("androidx.recyclerview:recyclerview:1.0.0")
implementation("com.google.android.material:material:1.2.0")
implementation("androidx.annotation:annotation:1.0.2")
implementation("com.github.bumptech.glide:glide:4.10.0")
implementation("com.google.android.material:material:1.2.0")
implementation("androidx.core:core-ktx:1.0.1")

androidTestUtil("androidx.test:orchestrator:1.3.0")
androidTestImplementation(project(":library"))
androidTestImplementation("org.assertj:assertj-core:2.9.1")
androidTestImplementation("com.nhaarman:mockito-kotlin:1.5.0")
androidTestImplementation("org.mockito:mockito-android:2.28.2")

testImplementation("junit:junit:4.12")

}
17 changes: 0 additions & 17 deletions sample/proguard-rules.pro

This file was deleted.

0 comments on commit 43285c4

Please sign in to comment.