Migrate to groovy-based gradle config
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
7a0875b937
commit
316bd8aeae
9 changed files with 65 additions and 77 deletions
31
android/build.gradle
Normal file
31
android/build.gradle
Normal file
|
@ -0,0 +1,31 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion(29)
|
||||
defaultConfig {
|
||||
minSdkVersion(23)
|
||||
targetSdkVersion(29)
|
||||
versionCode 1
|
||||
versionName "0.1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
}
|
||||
release {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(":shared")
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
|
||||
implementation "io.ktor:ktor-client-android:$ktorVersion"
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
kotlin("android.extensions")
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion(29)
|
||||
defaultConfig {
|
||||
minSdkVersion(23)
|
||||
targetSdkVersion(29)
|
||||
versionCode = 1
|
||||
versionName = "0.1.0"
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
}
|
||||
getByName("release") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val ktorVersion: String by project
|
||||
val logbackVersion: String by project
|
||||
|
||||
dependencies {
|
||||
implementation(project(":shared"))
|
||||
implementation("io.ktor:ktor-client-android:$ktorVersion")
|
||||
}
|
||||
|
||||
tasks.getByName("check").dependsOn("lint")
|
|
@ -32,5 +32,4 @@ dependencies {
|
|||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
|
||||
}
|
||||
|
|
30
build.gradle
Normal file
30
build.gradle
Normal file
|
@ -0,0 +1,30 @@
|
|||
buildscript {
|
||||
ext.kotlinVersion = '1.4.0'
|
||||
ext.ktorVersion = '1.3.2'
|
||||
ext.logbackVersion = '1.2.1'
|
||||
ext.exposedVersion = '0.24.1'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:4.0.1"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = "com.wbrawner.flayre"
|
||||
version = "0.1.0"
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url "https://kotlin.bintray.com/ktor" }
|
||||
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
import java.net.URI
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
val kotlinVersion: String by project
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:4.0.1")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = "com.wbrawner.flayre"
|
||||
version = "0.1.0"
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url = URI("https://kotlin.bintray.com/ktor") }
|
||||
maven { url = URI("https://kotlin.bintray.com/kotlinx") }
|
||||
}
|
||||
}
|
|
@ -17,9 +17,4 @@ org.gradle.jvmargs=-Xmx2048m
|
|||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
|
||||
ktorVersion=1.3.2
|
||||
kotlin.code.style=official
|
||||
kotlinVersion=1.4.0
|
||||
logbackVersion=1.2.1
|
||||
exposedVersion=0.24.1
|
2
settings.gradle
Normal file
2
settings.gradle
Normal file
|
@ -0,0 +1,2 @@
|
|||
rootProject.name = 'flayre'
|
||||
include ':shared', ':server', ':android', ':app'
|
|
@ -1,2 +0,0 @@
|
|||
rootProject.name = "flayre"
|
||||
include("shared", "server", "android", "app")
|
|
@ -1,6 +1,4 @@
|
|||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -18,5 +16,5 @@ sourceSets {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
|
||||
}
|
Loading…
Reference in a new issue