Skip to content

Instantly share code, notes, and snippets.

@hamen hamen/build.gradle.kts Secret
Created Mar 5, 2018

Embed
What would you like to do?
Example of Kotlin DSL Gradle file
import org.gradle.kotlin.dsl.kotlin
plugins {
id("com.android.library")
kotlin("android")
id("kotlin-android-extensions")
}
android {
buildToolsVersion("${project.rootProject.ext["buidToolsVersion"]}")
compileSdkVersion("${project.rootProject.ext["compileSdkVersion"]}".toInt())
defaultConfig {
minSdkVersion("${project.rootProject.ext["minSdkVersion"]}")
targetSdkVersion("${project.rootProject.ext["targetSdkVersion"]}")
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles("proguard-rules.pro")
}
}
compileOptions {
setTargetCompatibility(1.8)
setSourceCompatibility(1.8)
}
}
dependencies {
implementation(project(":google-play-licensing"))
compileOnly(project(":core"))
compileOnly(kotlin("stdlib", "1.2.30-eap-16"))
compileOnly("com.jakewharton.timber:timber:${project.rootProject.ext["timberVersion"]}")
compileOnly("com.android.support:support-annotations:${project.rootProject.ext["playVersion"]}")
compileOnly("com.google.code.gson:gson:2.8.2")
compileOnly("io.reactivex:rxjava:${project.rootProject.ext["rxJavaVersion"]}")
compileOnly("io.reactivex:rxandroid:${project.rootProject.ext["rxAndroidVersion"]}")
compileOnly("com.jakewharton.rxrelay:rxrelay:1.2.0")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.