Skip to content

Commit

Permalink
gradle plugin 7.0.0-beta03 + build cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joreilly committed May 30, 2021
1 parent 25b3a75 commit 140eaec
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 48 deletions.
26 changes: 0 additions & 26 deletions build.gradle

This file was deleted.

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

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

12 changes: 12 additions & 0 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ object Versions {
const val junit = "4.12"
}

object AndroidSdk {
const val min = 21
const val compile = 30
const val target = compile
}

object Deps {
const val kermit = "co.touchlab:kermit:${Versions.kermit}"
}
Expand All @@ -43,6 +49,12 @@ object Serialization {
val core = "org.jetbrains.kotlinx:kotlinx-serialization-core:${Versions.kotlinxSerialization}"
}

object Kodein {
val db = "org.kodein.db:kodein-db:${Versions.kodein_db}"
val dbSerializer = "org.kodein.db:kodein-db-serializer-kotlinx:${Versions.kodein_db}"

}


object Ktor {
val clientCore = "io.ktor:ktor-client-core:${Versions.ktor}"
Expand Down
40 changes: 21 additions & 19 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("kotlinx-serialization")
id("com.android.library")
id("org.jetbrains.kotlin.native.cocoapods")
id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3"
}

android {
compileSdkVersion(29)
buildToolsVersion("29.0.3")

compileSdk = AndroidSdk.compile
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdkVersion(21)
targetSdkVersion(29)
versionCode = 1
versionName = "1.0"
minSdk = AndroidSdk.min
targetSdk = AndroidSdk.target

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
getByName("release") {
minifyEnabled(false)
}
}

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

}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
Expand All @@ -40,6 +28,20 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
}
}


// workaround for https://youtrack.jetbrains.com/issue/KT-43944
android {
configurations {
create("androidTestApi")
create("androidTestDebugApi")
create("androidTestReleaseApi")
create("testApi")
create("testDebugApi")
create("testReleaseApi")
}
}


// CocoaPods requires the podspec to have a version.
version = "1.0"

Expand Down Expand Up @@ -82,8 +84,8 @@ kotlin {
implementation(Serialization.core)

// Kodein-DB
api("org.kodein.db:kodein-db:${Versions.kodein_db}")
api("org.kodein.db:kodein-db-serializer-kotlinx:${Versions.kodein_db}")
api(Kodein.db)
api(Kodein.dbSerializer)

// kermit
api(Deps.kermit)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ pluginManagement {

rootProject.name = "BikeShare"

enableFeaturePreview("GRADLE_METADATA")

include(":app", ":common", ":compose-desktop")

0 comments on commit 140eaec

Please sign in to comment.