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
6 changes: 0 additions & 6 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ jobs:
name: test-reports
path: test-reports.tar.zst

- name: Uploads Android Lint .sarif files to GitHub
uses: github/codeql-action/upload-sarif@v4.37.3
with:
sarif_file: ./core/build/reports
category: android-lint

- name: Save Kotlin Native Cache
uses: actions/cache/save@v6
if: github.ref_name == 'main'
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Before submitting a PR, get working code in a personal branch with tests passing
./gradlew check styleCheck
```

The `check` task includes `checkKotlinAbi`. After an intentional public API change, run
`./gradlew updateKotlinAbi` and review the changes to the ABI dumps under each library's `api/` directory.

Please make every effort to follow existing conventions and style in order to keep the code as
readable as possible.

Expand Down
7 changes: 3 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/*
* Copyright (c) 2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2025-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
*/

plugins {
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.gradle.maven.publish.plugin.base) apply false
alias(libs.plugins.jetbrains.compose) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlinx.binary.compatibility.validator) apply false
id("at.released.debuglayout.gradle.lint.detekt")
id("at.released.debuglayout.gradle.lint.spotless")
}
Expand Down
1 change: 0 additions & 1 deletion core/api/android/core.api
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
public final class at/released/debuglayout/DebugLayout {
public static final field $stable I
public static final field Companion Lat/released/debuglayout/DebugLayout$Companion;
public synthetic fun <init> (Landroidx/compose/ui/text/TextMeasurer;Lat/released/debuglayout/DisplayMetrics;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun columns-PEVvFHc (Lat/released/debuglayout/rowcolumn/DebugColumnsArrangement;IJ)V
public static synthetic fun columns-PEVvFHc$default (Lat/released/debuglayout/DebugLayout;Lat/released/debuglayout/rowcolumn/DebugColumnsArrangement;IJILjava/lang/Object;)V
public final fun grid-16rvTcU (FJF)V
Expand Down
589 changes: 589 additions & 0 deletions core/api/core.klib.api

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion core/api/jvm/core.api
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
public final class at/released/debuglayout/DebugLayout {
public static final field $stable I
public static final field Companion Lat/released/debuglayout/DebugLayout$Companion;
public synthetic fun <init> (Landroidx/compose/ui/text/TextMeasurer;Lat/released/debuglayout/DisplayMetrics;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun columns-PEVvFHc (Lat/released/debuglayout/rowcolumn/DebugColumnsArrangement;IJ)V
public static synthetic fun columns-PEVvFHc$default (Lat/released/debuglayout/DebugLayout;Lat/released/debuglayout/rowcolumn/DebugColumnsArrangement;IJILjava/lang/Object;)V
public final fun grid-16rvTcU (FJF)V
Expand Down
37 changes: 21 additions & 16 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
/*
* Copyright (c) 2024-2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2024-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
*/

@file:Suppress("UnstableApiUsage")

import com.android.build.gradle.ProguardFiles.getDefaultProguardFile
import org.jetbrains.compose.web.tasks.UnpackSkikoWasmRuntimeTask
import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation

plugins {
id("at.released.debuglayout.gradle.multiplatform.android")
id("at.released.debuglayout.gradle.multiplatform.kotlin")
id("at.released.debuglayout.gradle.multiplatform.publish")
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kotlinx.binary.compatibility.validator)
}

group = "at.released.debuglayout"
version = "0.4.0-SNAPSHOT"

android {
namespace = "at.released.debuglayout"
buildTypes {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
kotlin {
android {
namespace = "at.released.debuglayout"
optimization {
minify = true
keepRules.files.addAll(
listOf(
getDefaultProguardFile("proguard-android-optimize.txt", layout.buildDirectory),
file("proguard-rules.pro"),
),
)
}
}
}

kotlin {
androidTarget()
withHostTest { }
}
jvm()
js(IR) {
js {
browser()
}

Expand All @@ -46,6 +48,9 @@ kotlin {
macosX64()
macosArm64()

@OptIn(ExperimentalAbiValidation::class)
abiValidation()

sourceSets {
androidMain.dependencies {
implementation(libs.androidx.compose.ui.text)
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ kotlin.mpp.import.enableKgpDependencyResolution=true

systemProp.org.gradle.internal.publish.checksums.insecure=true
systemProp.org.gradle.s3.endpoint=https://storage.yandexcloud.net

org.gradle.tooling.parallel=true
7 changes: 2 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
androidMinSdk = "21"
androidCompileSdk = "36"

agp = "8.13.2"
agp = "9.5.2"
androidx-activityCompose = "1.11.0"
androidx-appcompat = "1.7.1"
androidx-constraintlayout = "2.2.1"
Expand All @@ -20,7 +20,6 @@ gradle-maven-publish-plugin = "0.35.0"
junit-platform-launcher = "6.0.3"
junit5 = "6.0.3"
kotlin = "2.4.21"
kotlinx-binary-compatibility-validator = "0.18.1"
spotless = "8.0.0"

[libraries]
Expand Down Expand Up @@ -54,15 +53,13 @@ detekt-plugin = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-p
dokka-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" }
gradle-maven-publish-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradle-maven-publish-plugin" }
kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinx-binary-compatibility-validator = { module = "org.jetbrains.kotlinx.binary-compatibility-validator:org.jetbrains.kotlinx.binary-compatibility-validator.gradle.plugin", version.ref = "kotlinx-binary-compatibility-validator" }
spotless-plugin = { group = "com.diffplug.spotless", name = "spotless-plugin-gradle", version.ref = "spotless" }

[plugins]
android-library = { id = "com.android.library", version.ref = "agp" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradle-maven-publish-plugin-base = { id = "com.vanniktech.maven.publish.base", version.ref = "gradle-maven-publish-plugin" }
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-binary-compatibility-validator" }
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
4 changes: 2 additions & 2 deletions gradle/plugin/project/lint/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2024-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -14,6 +14,6 @@ group = "at.released.debuglayout.gradle.lint"
dependencies {
implementation(libs.agp.plugin.api)
implementation(libs.detekt.plugin)
implementation(libs.kotlinx.binary.compatibility.validator)
implementation(libs.kotlin.plugin)
implementation(libs.spotless.plugin)
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2024-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -15,9 +15,6 @@ import com.android.build.api.dsl.Lint
internal fun Lint.configureCommonAndroidLint() {
quiet = true
ignoreWarnings = false
htmlReport = true
xmlReport = true
sarifReport = true
checkDependencies = false
ignoreTestSources = true

Expand Down
19 changes: 14 additions & 5 deletions gradle/plugin/project/lint/src/main/kotlin/android-lint.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2024-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -8,17 +8,28 @@
package at.released.debuglayout.gradle.lint

import com.android.build.api.dsl.CommonExtension
import com.android.build.api.dsl.KotlinMultiplatformAndroidLibraryTarget
import com.android.build.gradle.AppPlugin
import com.android.build.gradle.DynamicFeaturePlugin
import com.android.build.gradle.LibraryPlugin
import com.android.build.gradle.TestPlugin
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension

/*
* Convention plugin that configures Android Lint in projects with the Android Gradle plugin
*/
plugins.withId("com.android.kotlin.multiplatform.library") {
apply(plugin = "com.android.lint")
extensions.configure<KotlinMultiplatformExtension> {
targets.withType<KotlinMultiplatformAndroidLibraryTarget>().configureEach {
lint.configureCommonAndroidLint()
}
}
}

project.plugins.withType(AppPlugin::class.java) {
extensions.configure(CommonExtension::class.java) {
lint {
lint.apply {
configureCommonAndroidLint()
checkDependencies = true
}
Expand All @@ -32,9 +43,7 @@ listOf(
).forEach { agpLibraryPlugin ->
plugins.withType(agpLibraryPlugin) {
extensions.configure(CommonExtension::class.java) {
lint {
configureCommonAndroidLint()
}
lint.configureCommonAndroidLint()
}
}
}
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
/*
* Copyright (c) 2024-2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2024-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
*/

package at.released.debuglayout.gradle.multiplatform

import com.android.build.api.dsl.LibraryExtension
import org.gradle.api.JavaVersion
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11

/*
* Convention plugin that configures Android target in projects with the Kotlin Multiplatform plugin
* Convention plugin that configures Android library target in projects with the Kotlin Multiplatform plugin
*/
plugins {
id("org.jetbrains.kotlin.multiplatform")
id("com.android.kotlin.multiplatform.library")
id("at.released.debuglayout.gradle.multiplatform.kotlin")
id("at.released.debuglayout.gradle.lint.android-lint")
id("com.android.library")
}

kotlin {
androidTarget {
publishLibraryVariants = listOf("release")
}
}

extensions.configure<LibraryExtension>("android") {
compileSdk = versionCatalogs.named("libs").findVersion("androidCompileSdk").get().displayName.toInt()
defaultConfig {
android {
compileSdk = versionCatalogs.named("libs").findVersion("androidCompileSdk").get().displayName.toInt()
minSdk = versionCatalogs.named("libs").findVersion("androidMinSdk").get().displayName.toInt()
}
compileOptions {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
isCoreLibraryDesugaringEnabled = false
aarMetadata.minCompileSdk = 1
enableCoreLibraryDesugaring = false

compilerOptions {
jvmTarget.set(JVM_11)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
/*
* Copyright (c) 2024-2025, Alexey Illarionov and the compose-debuglayout project contributors.
* Copyright (c) 2024-2026, Alexey Illarionov and the compose-debuglayout project contributors.
* Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
*/

package at.released.debuglayout.gradle.multiplatform

import com.android.build.api.dsl.KotlinMultiplatformAndroidHostTestCompilation
import com.android.build.api.dsl.KotlinMultiplatformAndroidLibraryTarget
import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension

/*
* Convention plugin that configures unit tests in projects with the Kotlin Multiplatform plugin
*/
tasks.withType<Test> {
plugins.withId("com.android.kotlin.multiplatform.library") {
val libs = versionCatalogs.named("libs")
extensions.configure<KotlinMultiplatformExtension> {
targets.withType<KotlinMultiplatformAndroidLibraryTarget>().configureEach {
compilations.withType<KotlinMultiplatformAndroidHostTestCompilation>().configureEach {
defaultSourceSet.dependencies {
implementation(kotlin("test-junit5"))
runtimeOnly(libs.findLibrary("junit-jupiter-engine").get())
runtimeOnly(libs.findLibrary("junit-platform-launcher").get())
}
}
}
}
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
maxHeapSize = "2G"
testLogging {
Expand Down
28 changes: 28 additions & 0 deletions gradle/verification-keyring.keys
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,34 @@ vMxKy4GRZS18bXDI3vS6gRDNJDCqBYIhp13Os9k+ZpnwK3PPIHv4l1I0i0EHZKk=
=WJEa
-----END PGP PUBLIC KEY BLOCK-----

pub BF984B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