Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
interval: "daily"
target-branch: "main"

- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
target-branch: "publishing"
32 changes: 14 additions & 18 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,24 @@ jobs:
- name: Setup gradle
uses: gradle/gradle-build-action@v2

- name: Write secrets to local.properties
# Updated to 16.3 to meet Kotlin 2.2.10 requirements
- name: Set up Xcode version
run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer

- name: Publish to MavenCentral
if: ${{ github.event_name != 'pull_request' }}
run: |
echo sonatypeUsername="${SONATYPE_USERNAME}" >> "local.properties"
echo sonatypePassword="${SONATYPE_PASSWORD}" >> "local.properties"
echo gpgKeyId="${GPG_KEY_ID}" >> "local.properties"
echo gpgKeySecret="${GPG_KEY_SECRET}" >> "local.properties"
echo gpgKeyPassword="${GPG_KEY_PASSWORD}" >> "local.properties"
run: ./gradlew publishToMavenCentral --no-configuration-cache
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_KEY_SECRET: ${{ secrets.GPG_KEY_SECRET }}
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}

- name: Release to sonatype
run: ./gradlew publish
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_SECRET}}

documentation:
name: Publish documentation
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
runs-on: macos-latest
needs:
- check
environment:
Expand All @@ -92,7 +88,7 @@ jobs:
uses: actions/configure-pages@v3

- name: Generate api docs with dokka
run: ./gradlew dokkaHtml
run: ./gradlew dokkaGenerate

- name: Upload pages
uses: actions/upload-pages-artifact@v3
Expand All @@ -101,4 +97,4 @@ jobs:

- name: Release to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
9 changes: 9 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Version History

| Release | Kotlin | AGP | Dokka | BCV | Kover |
| :--- | :--- | :--- | :--- | :--- | :--- |
| v0.2.6 | 2.1.21 | 8.9.2 | 2.0.0 | 0.17.0 | 0.9.1 |
| v0.2.6-beta03 | 2.1.21-RC | 8.9.2 | 2.0.0 | 0.17.0 | 0.9.1 |
| v0.2.6-beta02 | 2.1.20 | 8.9.1 | 2.0.0 | 0.17.0 | 0.9.1 |
| v0.2.6-beta01 | 2.1.20 | 8.9.1 | 2.0.0 | 0.17.0 | 0.9.1 |
| v0.2.5 | 2.1.20 | 8.7.3 | 2.0.0 | 0.17.0 | 0.9.1 |
43 changes: 15 additions & 28 deletions basic-logging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
alias(libs.plugins.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.multiplatform.library)
alias(libs.plugins.kotlinx.binary.compatibility.validator)
alias(libs.plugins.dokka)
alias(libs.plugins.kover)
Expand All @@ -18,9 +18,13 @@ kotlin {
// DON'T FORGET TO RUN `./gradlew apiDump`
explicitApi()

jvm()
jvm {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}

js(IR) {
js {
binaries.executable()
browser {
commonWebpackConfig {
Expand All @@ -47,12 +51,9 @@ kotlin {
iosX64(), // mobile
iosArm64(), // mobile
iosSimulatorArm64(), // mobile
macosX64(), // desktop
macosArm64(), // desktop
tvosX64(), // tv
tvosArm64(), // tv
tvosSimulatorArm64(), // tv
watchosX64(), // watch
watchosArm32(), // watch
watchosArm64(), // watch
watchosDeviceArm64(), // watch
Expand All @@ -79,28 +80,14 @@ kotlin {

compilerOptions { freeCompilerArgs.add("-Xexpect-actual-classes") }

// Android JVM target target options
androidTarget {
publishLibraryVariants("release", "debug")
compilations.all{
compileTaskProvider.configure{
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
}
}
}

android {
namespace = "app.lexilabs.basic.logging"
compileSdk = 35
android {
namespace = "app.lexilabs.basic.logging"
compileSdk = libs.versions.build.sdk.compile.get().toInt()
minSdk = libs.versions.build.sdk.min.get().toInt()
withJava()

defaultConfig {
minSdk = 4 // was 24
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
compilerOptions {
jvmTarget.set(JvmTarget.JVM_26)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@file:JsModule("logger.js")
@file:OptIn(ExperimentalWasmJsInterop::class)

package app.lexilabs.basic.logging

Expand Down
147 changes: 49 additions & 98 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,127 +1,78 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
import org.jetbrains.dokka.gradle.DokkaTask
import com.vanniktech.maven.publish.MavenPublishBaseExtension


plugins {
alias(libs.plugins.multiplatform).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.multiplatform.library).apply(false)
alias(libs.plugins.dokka)
alias(libs.plugins.kover)
}

dependencies {
kover(project(":basic-logging"))
}
dependencies { kover(project(":basic-logging")) }

buildscript {
dependencies {
classpath(libs.dokka.base)
}
plugins { alias(libs.plugins.maven.publish)}
dependencies { classpath(libs.dokka.base) }
}

allprojects {
group = "app.lexilabs.basic"
version = rootProject.libs.versions.logging.get()

apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "com.vanniktech.maven.publish")

extensions.configure<PublishingExtension> {
repositories {
maven {
name = "maven"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
username = gradleLocalProperties(rootDir, providers).getProperty("sonatypeUsername")
password = gradleLocalProperties(rootDir, providers).getProperty("sonatypePassword")
}
}
/** dokka generation **/
dokka {
moduleName.set(project.name)
moduleVersion.set(project.version.toString())
dokkaPublications.html {
outputDirectory.set(rootDir.resolve("docs"))
suppressObviousFunctions.set(true)
suppressInheritedMembers.set(false)
failOnWarning.set(false)
offlineMode.set(false)
}

val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(tasks.dokkaHtml)
archiveClassifier.set("javadoc")
from("${layout.buildDirectory}/dokka")
pluginsConfiguration.html {
customAssets.from(rootDir.resolve("images/logo-icon.svg"))
footerMessage.set("(c) 2026 LexiLabs")
}
}

/** dokka generation **/
tasks.register<Delete>("clearDokkaHtml") {
delete("${projectDir.parent}/docs")
}
tasks.withType<DokkaTask>().configureEach{
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
dependsOn("clearDokkaHtml")
outputDirectory = file("${projectDir.parent}/docs")
moduleName = project.name
moduleVersion = project.version.toString()
customAssets = listOf(file("${projectDir.parent}/images/logo-icon.svg"))
// Need to create a cool looking theme at some point
//customStyleSheets = listOf(file("${projectDir.parent}/dokka/styles.css"))
footerMessage = "(c) 2025 LexiLabs"
failOnWarning = false
suppressObviousFunctions = true
suppressInheritedMembers = false
offlineMode = false
}
}
extensions.configure<MavenPublishBaseExtension> {

publications {
withType<MavenPublication> {
artifact(javadocJar)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)

pom {
name.set("Basic")
description.set("Easily integrate logging into your Kotlin Multiplatform Mobile (KMP / KMM) project")
licenses {
license {
name.set("MIT License")
url.set("https://raw.githubusercontent.com/LexiLabs-App/basic-logging/refs/heads/main/LICENSE")
}
signAllPublications()
coordinates(group.toString(), project.name, version.toString())
pom {
name.set("Basic")
description.set("Easily integrate logging into your Kotlin Multiplatform Mobile (KMP / KMM) project")
licenses {
license {
name.set("MIT License")
url.set("https://raw.githubusercontent.com/LexiLabs-App/basic-logging/refs/heads/main/LICENSE")
}
}
url.set("https://github.com/LexiLabs-App/basic-logging")
issueManagement {
system.set("Github")
url.set("https://github.com/LexiLabs-App/basic-logging/issues")
}
scm {
connection.set("https://github.com/LexiLabs-App/basic-logging.git")
url.set("https://github.com/LexiLabs-App/basic-logging")
issueManagement {
system.set("Github")
url.set("https://github.com/LexiLabs-App/basic-logging/issues")
}
scm {
connection.set("https://github.com/LexiLabs-App/basic-logging.git")
url.set("https://github.com/LexiLabs-App/basic-logging")
}
developers {
developer {
id.set("rjamison")
name.set("Robert Jamison")
email.set("rjamison@lexilabs.app")
url.set("https://logging.basic.lexilabs.app")
}
}
developers {
developer {
id.set("rjamison")
name.set("Robert Jamison")
email.set("rjamison@lexilabs.app")
url.set("https://logging.basic.lexilabs.app")
}
}
}
}
}

val publishing = extensions.getByType<PublishingExtension>()

if (gradle.startParameter.taskNames.any { it == "publish" }) {
extensions.configure<SigningExtension> {
useInMemoryPgpKeys(
gradleLocalProperties(rootDir, providers).getProperty("gpgKeyId"),
gradleLocalProperties(rootDir, providers).getProperty("gpgKeySecret"),
gradleLocalProperties(rootDir, providers).getProperty("gpgKeyPassword")
)
sign(publishing.publications)
}
} else {
extensions.configure<SigningExtension> {
useGpgCmd()
sign(publishing.publications)
}
}

// remove after https://youtrack.jetbrains.com/issue/KT-46466 is fixed
project.tasks.withType(AbstractPublishToMaven::class.java).configureEach {
dependsOn(project.tasks.withType(Sign::class.java))
}
}
}
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ org.gradle.parallel=true

#Kotlin
kotlin.code.style=official
kotlin.native.cacheKind.iosArm64=none
kotlin.native.cacheKind.iosSimulatorArm64=none

#Android
android.useAndroidX=true
Expand All @@ -23,6 +21,9 @@ kotlin.apple.xcodeCompatibility.nowarn=true
org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.macos.enabled=true

#Windows
kotlin.native.ignoreDisabledTargets=true

#Maven Publishing
#https://stackoverflow.com/questions/68127791/configuration-cache-enabled-causes-build-to-fail
org.gradle.unsafe.configuration-cache-problems=WARN
Expand All @@ -31,4 +32,4 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
#Dokka
org.gradle.caching=false
org.gradle.configuration-cache=false
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelper
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers
18 changes: 11 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
[versions]
logging = "0.2.6"
kotlin = "2.1.21"
agp = "8.9.2"
bcv = "0.17.0"
dokka = "2.0.0"
kover = "0.9.1"
logging = "0.3.0"
build-sdk-compile = "37"
build-sdk-min = "24"
kotlin = "2.4.10"
agp = "9.3.0" # switch to AGP 9.3.0 when released (switched early due to android toolchain
bcv = "0.18.1"
dokka = "2.2.0"
kover = "0.9.8"
maven-publish = "0.37.0"

[libraries]
dokka-base = { module = "org.jetbrains.dokka:dokka-base", version.ref = "dokka" }

[plugins]
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
android-library = { id = "com.android.library", version.ref = "agp" }
multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp"}
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv"}
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish"}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading
Loading