diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..30f923e --- /dev/null +++ b/android/build.gradle @@ -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" +} diff --git a/android/build.gradle.kts b/android/build.gradle.kts deleted file mode 100644 index db88484..0000000 --- a/android/build.gradle.kts +++ /dev/null @@ -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") diff --git a/app/build.gradle b/app/build.gradle index f508f02..da7f91a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' - } diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..c397699 --- /dev/null +++ b/build.gradle @@ -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" } + } +} diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index e023f16..0000000 --- a/build.gradle.kts +++ /dev/null @@ -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") } - } -} diff --git a/gradle.properties b/gradle.properties index 1b49095..ac6ee45 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..f38a383 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = 'flayre' +include ':shared', ':server', ':android', ':app' diff --git a/settings.gradle.kts b/settings.gradle.kts deleted file mode 100644 index 5ba5e46..0000000 --- a/settings.gradle.kts +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = "flayre" -include("shared", "server", "android", "app") diff --git a/shared/build.gradle.kts b/shared/build.gradle similarity index 71% rename from shared/build.gradle.kts rename to shared/build.gradle index 521811e..88e6e56 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle @@ -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" }