Skip to content

Commit

Permalink
Merge branch 'main' into pr/381
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinSchildhorn committed Nov 5, 2024
2 parents 6f2c6f9 + e87d7da commit dbed399
Show file tree
Hide file tree
Showing 58 changed files with 456 additions and 412 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ jobs:
CI: "true"
- name: Local Publish For Samples
if: matrix.os == 'macOS-latest'
run: ./gradlew publishToMavenLocal --no-daemon --stacktrace --build-cache
run: ./gradlew publishToMavenLocal --no-daemon --stacktrace --build-cache -PRELEASE_SIGNING_ENABLED=false
env:
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
S3_BUILD_CACHE_AWS_REGION: ${{ secrets.S3_BUILD_CACHE_AWS_REGION }}
S3_BUILD_CACHE_BUCKET_NAME: ${{ secrets.S3_BUILD_CACHE_BUCKET_NAME }}
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--ignore-engines true
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Change Log

## [2.0.4] - 2024-06-10
### Changed
- Added `ChunkedLogWriter`. This LogWriter can be used to wrap existing LogWriters and break their output into defined sizes. This is useful if your LogWriter outputs to something which limits message length (such as Logcat) (#396 thanks @psh)
```kotlin
Logger.setLogWriters(platformLogWriter().chunked(maxMessageLength = 4000))
```
## [2.0.3] - 2024-02-03

### Fixed
- Remove JUnit dependency from commonJvmMain source set (#390)

### Changed
- Kotlin 1.9.22
- [Gradle Plugin] Gradle 8.4
- [Gradle Plugin] Android Gradle Plugin 8.2.2
40 changes: 28 additions & 12 deletions convention-plugins/src/main/kotlin/wasm-setup.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Touchlab
* Copyright (c) 2024 Touchlab
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand All @@ -9,6 +9,8 @@
*/

import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig

plugins {
kotlin("multiplatform")
Expand All @@ -18,24 +20,38 @@ kotlin {
val wasmEnabled = project.findProperty("enableWasm") == "true"
if (wasmEnabled) {
@OptIn(ExperimentalWasmDsl::class)
wasm {
browser()
wasmJs {
browser {
commonWebpackConfig {
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
static = (static ?: mutableListOf()).apply {
add(project.rootDir.path)
}
}
}
}
nodejs()
d8()
binaries.executable()
}
}
sourceSets {
val jsAndWasmMain by creating
val jsAndWasmTest by creating
if (wasmEnabled) {
val wasmMain by getting {
dependsOn(jsAndWasmMain)
}

val wasmTest by getting {
dependsOn(jsAndWasmTest)
@Suppress("OPT_IN_USAGE")
applyDefaultHierarchyTemplate {
common {
group("jsAndWasmJs") {
withJs()
if (wasmEnabled) {
withWasm()
}
}
}
}
}

if (project.findProperty("enableWasm") == "true") {
rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}
}
26 changes: 17 additions & 9 deletions extensions/kermit-bugsnag/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Touchlab
* Copyright (c) 2024 Touchlab
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
Expand All @@ -11,7 +11,6 @@
* the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -20,19 +19,28 @@ plugins {
id("com.vanniktech.maven.publish")
}

apply(from = "../../gradle/configure-crash-logger.gradle")
kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget {
publishAllLibraryVariants()
}
macosX64()
macosArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
tvosArm64()
tvosSimulatorArm64()
tvosX64()
watchosArm32()
watchosArm64()
watchosSimulatorArm64()
watchosDeviceArm64()
watchosX64()

sourceSets {
commonMain {
dependencies {
api(libs.crashkios.bugsnag)
}
commonMain.dependencies {
api(libs.crashkios.bugsnag)
implementation(project(":kermit-core"))
}
}
}
Expand Down
27 changes: 17 additions & 10 deletions extensions/kermit-crashlytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Touchlab
* Copyright (c) 2024 Touchlab
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
Expand All @@ -11,7 +11,6 @@
* the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -20,20 +19,28 @@ plugins {
id("com.vanniktech.maven.publish")
}

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

kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget {
publishAllLibraryVariants()
}
macosX64()
macosArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
tvosArm64()
tvosSimulatorArm64()
tvosX64()
watchosArm32()
watchosArm64()
watchosSimulatorArm64()
watchosDeviceArm64()
watchosX64()

sourceSets {
commonMain {
dependencies {
api(libs.crashkios.crashlytics)
}
commonMain.dependencies {
api(libs.crashkios.crashlytics)
implementation(project(":kermit-core"))
}
}
}
Expand Down
13 changes: 4 additions & 9 deletions extensions/kermit-koin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Touchlab
* Copyright (c) 2024 Touchlab
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
Expand All @@ -11,7 +11,6 @@
* the License.
*/

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -21,8 +20,6 @@ plugins {
}

kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()
androidTarget {
publishAllLibraryVariants()
}
Expand Down Expand Up @@ -55,11 +52,9 @@ kotlin {
// androidNativeX64()

sourceSets {
commonMain {
dependencies {
implementation(project(":kermit"))
implementation(libs.koin)
}
commonMain.dependencies {
implementation(project(":kermit"))
implementation(libs.koin)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx4g
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
GROUP=co.touchlab
VERSION_NAME=2.0.2
VERSION_NAME=2.0.4

POM_NAME=Kermit
POM_DESCRIPTION=Kermit The Log
Expand Down
55 changes: 0 additions & 55 deletions gradle/configure-crash-logger.gradle

This file was deleted.

8 changes: 7 additions & 1 deletion gradle/gradle-mvn-mpp-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ def getAwsSecretKey() {
return hasProperty('AWS_SECRET_KEY') ? AWS_SECRET_KEY :
""
}

def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}

def releaseSigningRequired() {
def enabled = hasProperty('RELEASE_SIGNING_ENABLED') ? RELEASE_SIGNING_ENABLED : false
return isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") && enabled
}

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL :
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
Expand Down Expand Up @@ -53,7 +59,7 @@ def getGpgKey() {
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
required { releaseSigningRequired() }
def gpgKey = getGpgKey()
if(gpgKey != "") {
useInMemoryPgpKeys(getGpgKey(), "")
Expand Down
18 changes: 9 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ minSdk = "21"
compileSdk = "34"

# Dependencies
kotlin = "1.9.10"
kotlin = "1.9.22"
binaryCompatability = "0.13.2"

androidx-core = "1.12.0"
androidx-appcompat = "1.6.1"
androidx-constraintLayout = "2.1.4"
androidx-navigationFragment = "2.7.2"
androidx-navigationUI = "2.7.2"
androidx-navigationFragment = "2.7.6"
androidx-navigationUI = "2.7.6"
androidx-coordinatorLayout = "1.2.0"

android-gradle-plugin = "8.1.1"
android-gradle-plugin = "8.2.2"
android-test-runner = "1.5.2"

google-services = "4.3.15"
google-services = "4.4.0"

stately = "2.0.4"
testhelp = "0.6.11"
Expand All @@ -26,13 +26,13 @@ crashkios = "0.8.5"
bugsnag = "5.31.1"
bugsnag-gradle-plugin = "8.0.1"

koin-core = "3.5.0"
koin-android = "3.5.0"
koin-test = "3.5.0"
koin-core = "3.5.3"
koin-android = "3.5.3"
koin-test = "3.5.3"
coroutines = "1.7.3"
roboelectric = "4.10.3"
buildConfig = "4.1.2"
mavenPublish = "0.25.3"
mavenPublish = "0.27.0"

android-junitTest = "1.1.5"
junit = "4.13.2"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit dbed399

Please sign in to comment.