diff --git a/CHANGELOG.md b/CHANGELOG.md index 53bff5b0..87d55ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased -[//]: # (Changed, Added, Removed, Fixed) +[//]: # (Changed, Added, Removed, Fixed, Updated) _Stabilization release._ @@ -15,6 +15,13 @@ _Stabilization release._ ### Removed - remove deprecated API surface parts. +### Updated +- KSP 1.0.16 +- Android Gradle Plugin 8.2.0 +- Spotless 6.23.3 +- Gradle Enterprise 3.16.1 +- Dependency Analysis 1.28.0 + ## [0.2.0] - 2023-12-10 diff --git a/checks/gradle-plugin/settings.gradle.kts b/checks/gradle-plugin/settings.gradle.kts index b81a10ce..77498a0c 100644 --- a/checks/gradle-plugin/settings.gradle.kts +++ b/checks/gradle-plugin/settings.gradle.kts @@ -8,7 +8,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise") version "3.15.1" + id("com.gradle.enterprise") version "3.16.1" } dependencyResolutionManagement { diff --git a/checks/main/gradle.properties b/checks/main/gradle.properties index 47e8f513..e78d8d2c 100644 --- a/checks/main/gradle.properties +++ b/checks/main/gradle.properties @@ -15,6 +15,6 @@ kotlin.jvm.target.validation.mode = error # https://issuetracker.google.com/issues/185418482#comment32 # https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google # https://maven.google.com/web/index.html#com.android.tools.build:gradle -android.experimental.lint.version=8.3.0-alpha17 +android.experimental.lint.version=8.3.0-alpha18 MAX_DEBUG=true diff --git a/checks/main/settings.gradle.kts b/checks/main/settings.gradle.kts index b2c585e9..f31a3a92 100644 --- a/checks/main/settings.gradle.kts +++ b/checks/main/settings.gradle.kts @@ -8,7 +8,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise") version "3.15.1" + id("com.gradle.enterprise") version "3.16.1" } dependencyResolutionManagement { diff --git a/fluxo-kmp-conf/api/plugin.api b/fluxo-kmp-conf/api/plugin.api index 06c63cb5..f67bf350 100644 --- a/fluxo-kmp-conf/api/plugin.api +++ b/fluxo-kmp-conf/api/plugin.api @@ -313,6 +313,7 @@ public abstract interface class fluxo/conf/dsl/FluxoConfigurationExtensionPublic public abstract fun getReproducibleArtifacts ()Ljava/lang/Boolean; public abstract fun getVersion ()Ljava/lang/String; public abstract fun publicationConfig (Lkotlin/jvm/functions/Function1;)V + public static synthetic fun publicationConfig$default (Lfluxo/conf/dsl/FluxoConfigurationExtensionPublication;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public abstract fun setDefaultGitBranchName (Ljava/lang/String;)V public abstract fun setDescription (Ljava/lang/String;)V public abstract fun setEnablePublication (Ljava/lang/Boolean;)V diff --git a/fluxo-kmp-conf/dependencies/compileClasspath.txt b/fluxo-kmp-conf/dependencies/compileClasspath.txt index 95b2d3cf..52552e2c 100644 --- a/fluxo-kmp-conf/dependencies/compileClasspath.txt +++ b/fluxo-kmp-conf/dependencies/compileClasspath.txt @@ -1,16 +1,16 @@ -com.android.tools.build:apksig:8.1.4 -com.android.tools.build:apkzlib:8.1.4 -com.android.tools.build:builder-model:8.1.4 -com.android.tools.build:builder:8.1.4 -com.android.tools.build:gradle-api:8.1.4 -com.android.tools.build:gradle:8.1.4 -com.android.tools.build:manifest-merger:31.1.4 -com.android:zipflinger:8.1.4 -com.autonomousapps.dependency-analysis:com.autonomousapps.dependency-analysis.gradle.plugin:1.26.0 -com.autonomousapps:dependency-analysis-gradle-plugin:1.26.0 -com.diffplug.spotless:spotless-lib-extra:2.43.0 -com.diffplug.spotless:spotless-lib:2.43.0 -com.diffplug.spotless:spotless-plugin-gradle:6.23.2 +com.android.tools.build:apksig:8.2.0 +com.android.tools.build:apkzlib:8.2.0 +com.android.tools.build:builder-model:8.2.0 +com.android.tools.build:builder:8.2.0 +com.android.tools.build:gradle-api:8.2.0 +com.android.tools.build:gradle:8.2.0 +com.android.tools.build:manifest-merger:31.2.0 +com.android:zipflinger:8.2.0 +com.autonomousapps.dependency-analysis:com.autonomousapps.dependency-analysis.gradle.plugin:1.28.0 +com.autonomousapps:dependency-analysis-gradle-plugin:1.28.0 +com.diffplug.spotless:spotless-lib-extra:2.43.1 +com.diffplug.spotless:spotless-lib:2.43.1 +com.diffplug.spotless:spotless-plugin-gradle:6.23.3 com.dorongold.plugins:task-tree:2.1.1 com.dorongold.task-tree:com.dorongold.task-tree.gradle.plugin:2.1.1 com.dropbox.dependency-guard:com.dropbox.dependency-guard.gradle.plugin:0.4.3 @@ -20,16 +20,16 @@ com.github.ben-manes:gradle-versions-plugin:0.50.0 com.github.gmazzo.buildconfig:com.github.gmazzo.buildconfig.gradle.plugin:4.2.0 com.github.gmazzo.buildconfig:plugin:4.2.0 com.google.code.findbugs:jsr305:3.0.2 -com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.21-1.0.15 +com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.21-1.0.16 com.google.errorprone:error_prone_annotations:2.11.0 com.google.guava:failureaccess:1.0.1 com.google.guava:guava:31.1-jre com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava com.google.j2objc:j2objc-annotations:1.3 -com.gradle.enterprise:com.gradle.enterprise.gradle.plugin:3.15.1 +com.gradle.enterprise:com.gradle.enterprise.gradle.plugin:3.16.1 com.gradle.plugin-publish:com.gradle.plugin-publish.gradle.plugin:1.2.1 com.gradle.publish:plugin-publish-plugin:1.2.1 -com.gradle:gradle-enterprise-gradle-plugin:3.15.1 +com.gradle:gradle-enterprise-gradle-plugin:3.16.1 com.louiscad.complete-kotlin:com.louiscad.complete-kotlin.gradle.plugin:1.1.0 com.louiscad.complete-kotlin:plugin:1.1.0 com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:10.9.2 diff --git a/fluxo-kmp-conf/dependencies/runtimeClasspath.txt b/fluxo-kmp-conf/dependencies/runtimeClasspath.txt index 19c34c70..2ac9c95f 100644 --- a/fluxo-kmp-conf/dependencies/runtimeClasspath.txt +++ b/fluxo-kmp-conf/dependencies/runtimeClasspath.txt @@ -2,9 +2,9 @@ com.diffplug.durian:durian-collect:1.2.0 com.diffplug.durian:durian-core:1.2.0 com.diffplug.durian:durian-io:1.2.0 com.diffplug.durian:durian-swt.os:4.2.1 -com.diffplug.spotless:spotless-lib-extra:2.43.0 -com.diffplug.spotless:spotless-lib:2.43.0 -com.diffplug.spotless:spotless-plugin-gradle:6.23.2 +com.diffplug.spotless:spotless-lib-extra:2.43.1 +com.diffplug.spotless:spotless-lib:2.43.1 +com.diffplug.spotless:spotless-plugin-gradle:6.23.3 com.dropbox.dependency-guard:com.dropbox.dependency-guard.gradle.plugin:0.4.3 com.dropbox.dependency-guard:dependency-guard:0.4.3 com.googlecode.concurrent-trees:concurrent-trees:2.6.1 @@ -13,7 +13,7 @@ com.squareup.okhttp3:okhttp:4.11.0 com.squareup.okio:okio-jvm:3.2.0 com.squareup.okio:okio:3.2.0 commons-codec:commons-codec:1.16.0 -dev.equo.ide:solstice:1.7.3 +dev.equo.ide:solstice:1.7.4 io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.4 org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r org.eclipse.platform:org.eclipse.osgi:3.18.300 diff --git a/fluxo-kmp-conf/detekt-baseline.xml b/fluxo-kmp-conf/detekt-baseline.xml index 9935c37c..3b12af33 100644 --- a/fluxo-kmp-conf/detekt-baseline.xml +++ b/fluxo-kmp-conf/detekt-baseline.xml @@ -88,7 +88,7 @@ ForbiddenComment:SetupSpotless.kt$// TODO: Git pre-commit hook ForbiddenComment:SetupSpotless.kt$// TODO: Licenses ForbiddenComment:SetupSpotless.kt$// TODO: Only if java plugin is enabled? - ForbiddenComment:SetupSpotless.kt$// TODO: Only if kotlin plugin enabled? + ForbiddenComment:SetupSpotless.kt$// TODO: Use ktlint directly? ForbiddenComment:SetupSpotless.kt$// TODO: read base settings from .editorconfig ? ForbiddenComment:SetupTestsReport.kt$// TODO: Support Gradle before 8.0 (set service parameter and usesService) ? ForbiddenComment:SetupVerification.kt$// TODO: Test separate ktlint setup with gradle plugin @@ -113,7 +113,7 @@ ImportOrdering:NodeGraphsRenderer.kt$import kotlin.math.min import org.gradle.internal.graph.GraphRenderer import org.gradle.internal.logging.text.StyledTextOutput import org.gradle.internal.logging.text.StyledTextOutput.Style.Info ImportOrdering:OnBuildFinishedService.kt$import java.util.concurrent.ConcurrentHashMap import org.gradle.api.provider.Provider import org.gradle.api.services.BuildService import org.gradle.api.services.BuildServiceParameters import org.gradle.tooling.events.FinishEvent import org.gradle.tooling.events.OperationCompletionListener ImportOrdering:PropsAndEnv.kt$import fluxo.conf.dsl.container.impl.KmpTargetCode.Companion.KMP_TARGETS_ALL_PROP import fluxo.conf.dsl.container.impl.KmpTargetCode.Companion.KMP_TARGETS_PROP import fluxo.conf.dsl.container.impl.KmpTargetCode.Companion.SPLIT_TARGETS_PROP import fluxo.conf.feat.LOAD_KMM_CODE_COMPLETION_FLAG import fluxo.conf.impl.envOrPropFlag import fluxo.conf.impl.envOrPropFlagValue import fluxo.conf.impl.envOrPropValue import fluxo.conf.impl.envOrPropValueLenient import fluxo.conf.impl.memoize import java.util.regex.Pattern import org.gradle.api.Incubating import org.gradle.api.Project import org.gradle.api.provider.Provider - ImportOrdering:SetupAndroidLint.kt$import com.android.build.api.dsl.CommonExtension import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask import com.android.build.gradle.internal.lint.AndroidLintTask import com.android.build.gradle.internal.lint.AndroidLintTextOutputTask import com.android.build.gradle.internal.lint.LintTool import com.android.build.gradle.internal.tasks.AndroidVariantTask import com.android.build.gradle.tasks.ExtractAnnotations import fluxo.conf.FluxoKmpConfContext import fluxo.conf.dsl.container.impl.KmpTargetCode import fluxo.conf.dsl.impl.FluxoConfigurationExtensionImpl import fluxo.conf.impl.SHOW_DEBUG_LOGS import fluxo.conf.impl.configureExtension import fluxo.conf.impl.disableTask import fluxo.conf.impl.ifNotEmpty import fluxo.conf.impl.l import fluxo.conf.impl.v import fluxo.conf.impl.withType import io.gitlab.arturbosch.detekt.report.ReportMergeTask import java.util.concurrent.atomic.AtomicBoolean import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.tasks.TaskProvider import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME + ImportOrdering:SetupAndroidLint.kt$import com.android.build.api.dsl.CommonExtension import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask import com.android.build.gradle.internal.lint.AndroidLintTask import com.android.build.gradle.internal.lint.AndroidLintTextOutputTask import com.android.build.gradle.internal.lint.LintTool import com.android.build.gradle.internal.tasks.AndroidVariantTask import com.android.build.gradle.tasks.ExtractAnnotations import fluxo.conf.FluxoKmpConfContext import fluxo.conf.dsl.container.impl.KmpTargetCode import fluxo.conf.dsl.impl.FluxoConfigurationExtensionImpl import fluxo.conf.impl.SHOW_DEBUG_LOGS import fluxo.conf.impl.configureExtension import fluxo.conf.impl.disableTask import fluxo.conf.impl.ifNotEmpty import fluxo.conf.impl.l import fluxo.conf.impl.v import fluxo.conf.impl.w import fluxo.conf.impl.withType import io.gitlab.arturbosch.detekt.report.ReportMergeTask import java.util.concurrent.atomic.AtomicBoolean import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.provider.Property import org.gradle.api.tasks.TaskProvider import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME ImportOrdering:SetupAndroidSigning.kt$import com.android.build.api.dsl.ApkSigningConfig import com.android.build.api.dsl.ApplicationExtension import fluxo.conf.impl.get import fluxo.conf.impl.l import java.io.File import java.util.Properties import org.gradle.api.Project ImportOrdering:SetupJvmCompatibility.kt$import com.android.build.gradle.TestedExtension import fluxo.conf.impl.configureExtensionIfAvailable import fluxo.conf.impl.d import fluxo.conf.impl.l import kotlin.math.max import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.plugins.ExtensionAware import org.gradle.api.plugins.JavaPluginExtension import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.compile.JavaCompile import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinWithJavaCompilation import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget ImportOrdering:SetupKotlinCompatibility.kt$import bundle import fluxo.conf.dsl.impl.FluxoConfigurationExtensionImpl import fluxo.conf.impl.e import fluxo.conf.impl.isTestRelated import kotlin.KotlinVersion import org.gradle.api.Project import org.gradle.api.logging.Logger import org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinVersion as KotlinLangVersion import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion import org.jetbrains.kotlin.gradle.plugin.sources.AbstractKotlinSourceSet @@ -166,6 +166,7 @@ MultiLineIfElse:SetupTestsReport.kt$project.tasks.register<TestReportsMergeTask>(TEST_REPORTS_TASK_NAME) { group = JavaBasePlugin.VERIFICATION_GROUP description = "Combines all tests reports from all modules to the published root one" output.set(project.layout.buildDirectory.file(TEST_REPORTS_FILE_NAME)) } NestedBlockDepth:KotlinSourceSetsReportTask.kt$KotlinSourceSetsReportTask.KotlinSourceSetsModel$fun buildTrees(): List<GraphNode> NestedBlockDepth:LoadAndApplyPluginIfNotApplied.kt$private fun FluxoKmpConfContext.loadPluginArtifactAndGetClass( pluginId: String, pluginVersion: String?, className: String?, lookupClassName: Boolean, ): Class<*>? + NestedBlockDepth:SetupAndroidLint.kt$private fun Task.reportLintVersion(lintTool: LintTool?): Boolean NestedBlockDepth:SetupKotlin.kt$internal fun configureKotlinMultiplatform( configuration: FluxoConfigurationExtensionImpl, containers: Array<Container>, ): Boolean NestedBlockDepth:SetupPublication.kt$internal fun MavenPublication.setupPublicationPom( project: Project, context: FluxoKmpConfContext, config: FluxoPublicationConfig, useDokka: Boolean, ) NestedBlockDepth:TestReportsMergeTask.kt$TestReportsMergeTask$@TaskAction fun merge() @@ -188,6 +189,7 @@ ParameterListWrapping:VersionCatalogUtils.kt$( alias: String, body: (PluginDependency) -> Unit, ) ReturnCount:KotlinSourceSetsReportTask.kt$KotlinSourceSetsReportTask.KotlinSourceSetsModel$private fun GraphNode.isReachableThrough(node: GraphNode): Boolean ReturnCount:KotlinSourceSetsReportTask.kt$KotlinSourceSetsReportTask.SourceSetNodeRenderer$context(StyledTextOutput) @Suppress("CyclomaticComplexMethod") override fun renderAttrs(node: RenderableNode, parent: RenderableNode?) + ReturnCount:SetupAndroidLint.kt$private fun Task.reportLintVersion(lintTool: LintTool?): Boolean ReturnCount:SetupKotlinExperimentalTestCompilation.kt$internal fun KotlinTarget.setupExperimentalLatestCompilation( conf: FluxoConfigurationExtensionImpl, isMultiplatform: Boolean, ) UnusedPrivateMember:SetupAndroid.kt$private fun Project.configureMonkeyLauncherTasks() Wrapping:FluxoConfigurationExtensionAndroidImpl.kt$FluxoConfigurationExtensionAndroidImpl$( diff --git a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/feat/SetupAndroidLint.kt b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/feat/SetupAndroidLint.kt index dceeabd6..25e668ef 100644 --- a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/feat/SetupAndroidLint.kt +++ b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/feat/SetupAndroidLint.kt @@ -16,11 +16,13 @@ import fluxo.conf.impl.disableTask import fluxo.conf.impl.ifNotEmpty import fluxo.conf.impl.l import fluxo.conf.impl.v +import fluxo.conf.impl.w import fluxo.conf.impl.withType import io.gitlab.arturbosch.detekt.report.ReportMergeTask import java.util.concurrent.atomic.AtomicBoolean import org.gradle.api.Project import org.gradle.api.Task +import org.gradle.api.provider.Property import org.gradle.api.tasks.TaskProvider import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME @@ -146,7 +148,31 @@ private fun Task.reportLintVersion() { } private fun Task.reportLintVersion(lintTool: LintTool?): Boolean { - val lintVersion = lintTool?.version?.orNull?.trim() + var lintVersion: String? = null + var versionKey: Property? = null + try { + versionKey = lintTool?.versionKey + lintVersion = versionKey?.orNull?.trim() + } catch (e: Throwable) { + var report = true + try { + if (versionKey == null && lintTool != null) { + // AGP before 8.2 + lintTool.javaClass.getDeclaredMethod("getVersion").invoke(lintTool)?.let { + lintVersion = it.toString().trim() + } + report = false + } + } catch (e2: Throwable) { + e2.addSuppressed(e) + logger.w("Failed to get Android Lint version", e2) + return false + } + if (report) { + logger.w("Failed to get Android Lint version", e) + return false + } + } if (lintVersion.isNullOrEmpty() || !IS_VERSION_REPORTED.compareAndSet(false, true)) { return false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1e5bdb2d..9413b874 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -29,7 +29,7 @@ kotlin = "1.9.21" jetbrains-compose = "1.5.11" # https://github.com/google/ksp/releases -ksp = "1.9.21-1.0.15" +ksp = "1.9.21-1.0.16" # region Android specific @@ -88,7 +88,7 @@ androidBuildTools = "34.0.0" # Gradle plug-in to build Android applications. # https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google # WARNING: Do not forget to update the version badge in `README.md`! -android-gradle-plugin = "8.1.4" +android-gradle-plugin = "8.2.0" # endregion @@ -113,7 +113,7 @@ detekt = "1.23.4" ktlint = "1.0.1" # https://plugins.gradle.org/plugin/com.diffplug.gradle.spotless -spotless = "6.23.2" +spotless = "6.23.3" # Gradle plugin for building plugins for IntelliJ-based IDEs # https://plugins.gradle.org/plugin/org.jetbrains.intellij @@ -165,7 +165,7 @@ gradle-plugin-publish = { id = "com.gradle.plugin-publish", version = "1.2.1" } # https://scans.gradle.com/plugin/ # https://plugins.gradle.org/plugin/com.gradle.enterprise # NOTE: Don't forget to edit version in all `settings.gradle.kts` files as well! -gradle-enterprise = { id = "com.gradle.enterprise", version = "3.15.1" } +gradle-enterprise = { id = "com.gradle.enterprise", version = "3.16.1" } # Gradle Versions Plugin: provides a task to determine which dependencies have updates # https://github.com/ben-manes/gradle-versions-plugin/releases @@ -176,7 +176,7 @@ deps-versions = { id = "com.github.ben-manes.versions", version = "0.50.0" } # https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/blob/main/CHANGELOG.md # https://mvnrepository.com/artifact/com.autonomousapps/dependency-analysis-gradle-plugin # https://plugins.gradle.org/plugin/com.autonomousapps.dependency-analysis -deps-analysis = { id = "com.autonomousapps.dependency-analysis", version = "1.26.0" } +deps-analysis = { id = "com.autonomousapps.dependency-analysis", version = "1.28.0" } # Plugin that guards against unintentional dependency changes # https://github.com/dropbox/dependency-guard/blob/main/CHANGELOG.md#change-log diff --git a/settings.gradle.kts b/settings.gradle.kts index 98e524d4..d14dba5f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,7 +5,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise") version "3.15.1" + id("com.gradle.enterprise") version "3.16.1" } dependencyResolutionManagement {