Skip to content

Commit

Permalink
Kotlin + AGP + Gradle + Dependency updates + Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
findjigar committed Sep 15, 2023
1 parent 8e20fa5 commit c55733c
Show file tree
Hide file tree
Showing 63 changed files with 1,025 additions and 1,203 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
java-version: "17"
- name: Install msys2
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -73,4 +73,4 @@ jobs:
shell: bash

env:
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"
java-version: "17"
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Cache gradle
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
tag: ${{ steps.version-match.outputs.group1 }}

env:
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"
17 changes: 8 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@

buildscript {
extra["kotlin_plugin_id"] = "co.touchlab.kermit"
dependencies {
classpath("com.vanniktech:gradle-maven-publish-plugin:0.23.1")
}
}

plugins {
kotlin("multiplatform") apply false
id("com.android.library") version "7.4.2" apply false
id("com.github.gmazzo.buildconfig") version "2.1.0" apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
id("org.jetbrains.dokka") version "1.8.20" apply false
id("co.touchlab.touchlabtools.docusaurusosstemplate") version "0.1.10"
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.buildConfig) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.binaryCompatability)
alias(libs.plugins.dokka) apply false
alias(libs.plugins.touchlab.docusaurus.template)
alias(libs.plugins.android.library) apply false

}
apiValidation {
nonPublicMarkers.add("co.touchlab.kermit.ExperimentalKermitApi")
Expand Down
7 changes: 0 additions & 7 deletions extensions/kermit-bugsnag/api/kermit-bugsnag.api
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
public final class co/touchlab/kermit/bugsnag/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

29 changes: 13 additions & 16 deletions extensions/kermit-bugsnag/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,33 @@
plugins {
id("com.android.library")
kotlin("multiplatform")
id("com.vanniktech.maven.publish")
}

apply(from = "../../gradle/configure-crash-logger.gradle")
kotlin {
targetHierarchy.default()
androidTarget {
publishAllLibraryVariants()
}

val commonMain by sourceSets.getting {
dependencies {
api(libs.crashkios.bugsnag)
}
}

val androidMain by sourceSets.getting {
dependencies {
sourceSets {
commonMain {
dependencies {
api(libs.crashkios.bugsnag)
}
}
}
}

android {
namespace = "co.touchlab.kermit.bugsnag"
compileSdk = 30
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = 16
minSdk = libs.versions.minSdk.get().toInt()
}

val main by sourceSets.getting {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

apply(plugin = "com.vanniktech.maven.publish")
}
12 changes: 0 additions & 12 deletions extensions/kermit-bugsnag/src/androidMain/AndroidManifest.xml

This file was deleted.

7 changes: 0 additions & 7 deletions extensions/kermit-crashlytics/api/kermit-crashlytics.api
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
public final class co/touchlab/kermit/crashlytics/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

29 changes: 13 additions & 16 deletions extensions/kermit-crashlytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,34 @@
plugins {
id("com.android.library")
kotlin("multiplatform")
id("com.vanniktech.maven.publish")
}

apply(from = "../../gradle/configure-crash-logger.gradle")

kotlin {
targetHierarchy.default()
androidTarget {
publishAllLibraryVariants()
}

val commonMain by sourceSets.getting {
dependencies {
api(libs.crashkios.crashlytics)
}
}

val androidMain by sourceSets.getting {
dependencies {
sourceSets {
commonMain {
dependencies {
api(libs.crashkios.crashlytics)
}
}
}
}

android {
namespace = "co.touchlab.kermit.crashlytics"
compileSdk = 30
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = 16
minSdk = libs.versions.minSdk.get().toInt()
}

val main by sourceSets.getting {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

apply(plugin = "com.vanniktech.maven.publish")
}
11 changes: 0 additions & 11 deletions extensions/kermit-crashlytics/src/androidMain/AndroidManifest.xml

This file was deleted.

7 changes: 0 additions & 7 deletions extensions/kermit-koin/api/android/kermit-koin.api
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
public final class co/touchlab/kermit/koin/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class co/touchlab/kermit/koin/GetLoggerWithTagKt {
public static final fun kermitLoggerModule (Lco/touchlab/kermit/Logger;)Lorg/koin/core/module/Module;
}
Expand Down
23 changes: 11 additions & 12 deletions extensions/kermit-koin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
plugins {
id("com.android.library")
kotlin("multiplatform")
id("com.vanniktech.maven.publish")
}

kotlin {
targetHierarchy.default()
androidTarget {
publishAllLibraryVariants()
}
Expand All @@ -31,7 +33,6 @@ kotlin {
iosX64()
iosArm64()
iosSimulatorArm64()
watchosArm32()
watchosArm64()
watchosSimulatorArm64()
watchosX64()
Expand All @@ -40,17 +41,17 @@ kotlin {
tvosX64()

linuxX64()

mingwX64()

// TODO: These targets aren't supported by Koin yet:
// TODO: These targets aren't supported by Koin yet or stopped the support:
// watchosArm32()
// androidNativeArm32()
// androidNativeArm64()
// androidNativeX86()
// androidNativeX64()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(project(":kermit"))
implementation(libs.koin)
Expand All @@ -61,14 +62,12 @@ kotlin {

android {
namespace = "co.touchlab.kermit.koin"
compileSdk = 30
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = 16
minSdk = libs.versions.minSdk.get().toInt()
}

val main by sourceSets.getting {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

apply(plugin = "com.vanniktech.maven.publish")
}
11 changes: 0 additions & 11 deletions extensions/kermit-koin/src/androidMain/AndroidManifest.xml

This file was deleted.

3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
kotlin.code.style=official
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2g
org.gradle.jvmargs=-Xmx4g

SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
GROUP=co.touchlab
VERSION_NAME=2.0.0-RC5
KOTLIN_VERSION=1.9.0

POM_NAME=Kermit
POM_DESCRIPTION=Kermit The Log
Expand Down
Loading

0 comments on commit c55733c

Please sign in to comment.