The core Gradle plugin and associated logic used for Slack's Android app

Overview

slack-gradle-plugin

This repository contains the core Gradle plugin and associated logic used for Slack's Android app.

This repo is effectively read-only and does not publish artifacts to Maven Central. We develop these in the open to knowledge-share with the community.

As such, our issue tracker is closed and we don't normally accept external PRs, but we welcome your questions in the discussions section of the project!

We may later publish some of these components. If you're interested in this, feel free to raise in a discussions post or vote for existing suggestions.

Highlights

Common project configuration

The slack.base plugin offers common configuration for all projects implementing it, covering a wide spectrum of Android, Kotlin, and Java configurations.

This includes a whole host of things!

  • Common Android configuration (single variant libraries, disabling unused features, compose, etc).
  • Common Kotlin configuration (freeCompilerArgs, JVM target, etc).
  • Common Java configuration (toolchains, release versions, etc).
  • Common annotation processors.
  • SlackExtension (see next section).
  • Formatting (via Spotless).
  • Platforms and BOM dependencies (see "Platform plugins" section below).
  • Common lint checks (both on Android and plain JVM projects).

Feature DSL

To ease use and configuration of common features in projects, we expose a slack DSL in projects that allows for configuration of these in a semantically easy and boilerplate-free way. This is controlled via SlackExtension.

slack {
  features {
    dagger()
    moshi(codegen = true)
  }
  android {
    features {
      robolectric()
    }
  }
}

A major benefit of this is that we can intelligently configure features and avoid applying costly plugins like Kapt unless they're actually needed for a specific feature, such as Java injections in projects using Dagger. Since this is pure code, we can also propagate deprecated behavior by deprecating the corresponding functions in the DSL.

Platform plugins

Platforms.kt contains an implementation that sources a VersionCatalog and applies it to a Gradle platform project. This allows us to effectively treat our versions catalog as a BOM and apply it to all projects in the consuming repo and reduce dependency version stratification.

Thermal throttling capture

MacBooks can suffer thermal throttling and result in poor build performance. We built instrumentation for this to capture these and include them in our build scans to better understand their impact. We support both Intel and Apple Silicon macs now and contain this implementation in ThermalsWatcher.kt. This also includes helpful charting APIs for visualizing the data (courtesy of our friends at Square).

Better Properties

Gradle's built-in property support is limited and has surprising behavior, so we have our own system on top of it that has consistent precedence, local.properties support, project-local gradle.properties, and configuration caching support. Check out safeProperty() in PropertyUtil.kt.

Dependency Rake

DependencyRake.kt contains an extension to the gradle-dependency-analysis-plugin that applies its advice to a project to automatically optimize it and rake dependencies.

Module Stats (aka "Mod Score")

As a part of our modularization efforts, we developed a scoring mechanism for modules that we could use as a measure of their "modularization". This includes a number of metrics and weighs them in a formula to compute a score. This includes LoC, language mixtures, and build graph centrality. This logic is under the slack.stats package.

Robolectric Jars Management

Robolectric uses preinstrumented Android API jars that live on maven central. While it can handle downloading of these automatically, we found this implementation to be brittle and unreliable, so we built our own version of it that handles downloading these into a local .cache directory. This implementation lives in UpdateRobolectricJarsTask.kt and that task is configured to be a dependency of all Test tasks.

Bootstrap

We try to simplify and streamline the bootstrap process for both local development and on CI. This involves computing optimized JVM arguments for the Gradle and Kotlin daemons (which differ between CI and local) as well as toe-holds for future customizations. This logic lives in BootstrapTask.kt.

Permission Checks

To avoid accidentally checking in any new, unexpected manifest permissions, we have a CheckManifestPermissionsTask that compares the final merged manifest's permissions to an allow list of known permissions. This is allow list is checked in and expected to be guarded by a CODEOWNERS watch and will fail the build if they differ.

slack {
  android {
    app {
      permissionAllowlist {
        if (name == "externalRelease") {
          setAllowlistFile(file("permissionsAllowlist.txt"))
        }
      }
    }
  }
}

APK Versioning Computers

AGP offers new property-based APIs for computing APK version codes and version names. We use this to compute information from different inputs (CI build number, git state, etc) and control this logic in ApkVersioningPlugin.kt.

Check dependency versions

Sometimes a dependency update may bring with it a surprise update to a transitive dependency that we also declare. In order to avoid this happening unexpectedly, the CheckDependencyVersionsTask checks that any transitive dependency versions that also correspond to a version declared in our VersionCatalog match the version there. It's ok if they don't, but the author just need to update the version in the catalog too to be explicit (or investigate further if it's an unwanted surprise!).

AGP Handlers

AGP occasionally contains new or breaking API changes that we want to handle gracefully in early testing. We regularly test against newer preview versions of AGP so we can't just hardcode in new APIs and expect them to work everywhere. To handle this, we have an AgpHandler interface that can be used to abstract these new APIs in a backward-compatible way. Then we ship implementations of this as different artifacts that are built against different AGP versions. Then, at runtime, we pick the appropriate instance (via service loading) to use for the current AGP version being used in that build.

Detekt baselining

Detekt is a static analysis tool that we use to check for common issues in our code. We use one global baseline file for baselined issues (when introducing new checks or updates), but Detekt doesn't currently support this easily. So, we built MergeDetektBaselinesTask to merge all the generated baselines from each subproject into a single global baseline.

Misc tools

There are a ton of miscellaneous tools, utilities, and glue code for Gradle (and various plugins) sprinkled throughout this project.

License

Copyright 2022 Slack Technologies, LLC

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

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Update to Kotlin 1.8.0

    Update to Kotlin 1.8.0

    This updates to Kotlin 1.8.0 for both the repo and its configuration logic to use new KGP 1.8.0 APIs (namely compilerOptions). With this, this plugin now requires kotlin 1.8.0 or later.

    opened by ZacSweers 4
  • Update dependency com.android.tools:common to v30.2.1

    Update dependency com.android.tools:common to v30.2.1

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | com.android.tools:common (source) | minor | 30.1.2 -> 30.2.1 |


    Configuration

    πŸ“… Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 3
  • Update dependency com.android.tools.build:gradle to v7.2.1

    Update dependency com.android.tools.build:gradle to v7.2.1

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | com.android.tools.build:gradle (source) | minor | 7.1.2 -> 7.2.1 |


    Configuration

    πŸ“… Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 3
  • Update dependency com.squareup.anvil:gradle-plugin to v2.4.1-1-6

    Update dependency com.squareup.anvil:gradle-plugin to v2.4.1-1-6

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | com.squareup.anvil:gradle-plugin | patch | 2.4.1 -> 2.4.1-1-6 |


    Configuration

    πŸ“… Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 3
  • Update okhttp to v5.0.0-SNAPSHOT

    Update okhttp to v5.0.0-SNAPSHOT

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | com.squareup.okhttp3:logging-interceptor | dependencies | patch | 5.0.0-alpha.8 -> 5.0.0-SNAPSHOT | | com.squareup.okhttp3:okhttp-bom | dependencies | patch | 5.0.0-alpha.8 -> 5.0.0-SNAPSHOT | | com.squareup.okhttp3:okhttp | dependencies | patch | 5.0.0-alpha.8 -> 5.0.0-SNAPSHOT |


    Release Notes

    square/okhttp

    v5.0.0-alpha.10

    2022-06-26

    • Fix: Configure the multiplatform artifact (com.squareup.okhttp3:okhttp:3.x.x) to depend on the JVM artifact (com.squareup.okhttp3:okhttp-jvm:3.x.x) for Maven builds. This should work-around an issue where Maven doesn't interpret Gradle metadata.
    • Fix: Make another attempt at supporting Kotlin 1.5.31 at runtime. We were crashing on DurationUnit which was a typealias in 1.5.x.
    • Upgrade: [Okio 3.2.0][okio_3_2_0].

    v5.0.0-alpha.9

    2022-06-16

    • New: Enforce label length limits in URLs. HttpUrl now rejects URLs whose domains aren't valid. This includes overly-long domain names (longer than 253 characters), overly-long labels (more than 63 characters between dots), and empty labels.
    • New: Don't include the Content-Length header in multipart bodies. Servers must delimit OkHttp's request bodies using the boundary only. (This change makes OkHttp more consistent with browsers and other HTTP clients.)
    • New: Drop the tunnelProxy argument in MockWebServer.useHttps(). This change only impacts the OkHttp 5.x API which uses the mockwebserver3 package.
    • Fix: Don't call toDuration() which isn't available in kotlin-stdlib 1.4.

    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 2
  • Upgrade to dependency analysis plugin 1.0

    Upgrade to dependency analysis plugin 1.0

    This updates DAGP to its 1.0 APIs! This included major updates to DependencyRake along the way, namely:

    • Removing our leftover shims for resources-only projects (these should Just Work now that we use non-transitive R classes I think?)
    • Removing our custom facade handling as this is now covered by the plugin's "bundles" notion
    • Apply common bundles and configurations in SGP to projects

    Will take this for a spin in the main repo when I'm back from my trip

    opened by ZacSweers 2
  • Update dependency com.android.tools.build:gradle to v8.0.0-alpha10

    Update dependency com.android.tools.build:gradle to v8.0.0-alpha10

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | com.android.tools.build:gradle (source) | dependencies | patch | 8.0.0-alpha09 -> 8.0.0-alpha10 |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 1
  • Update ksp to v1.7.20-1.0.7

    Update ksp to v1.7.20-1.0.7

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | com.google.devtools.ksp (source) | plugin | patch | 1.7.10-1.0.6 -> 1.7.20-1.0.7 | | com.google.devtools.ksp:symbol-processing-gradle-plugin (source) | dependencies | patch | 1.7.10-1.0.6 -> 1.7.20-1.0.7 |


    Release Notes

    google/ksp

    v1.7.20-1.0.7

    Compare Source

    Behavior Changes

    blockOtherPlugins is on by default. The old behavior (allowing other plugins to be loaded in KSP's Gradle task) is deprecated and will be removed in the future.

    New Features

    #​1041 A new CodeGenerator.createFile method with more flexibility

    Issues Fixed

    #​167 nullability for java sources ignores annotations #​897 Compatibility with Kotlin/Native compiler plugins #​974 Exceptions are swallowed when using withCompilation flag #​985 No "kotlin.ExtensionFunctionType" annotation on functional types with receivers #​989 NoSuchElementException when getting a default argument of the inner annotation type #​997 Incremental KSP fails in Java/Kotlin mixed module #​1011 Generic TypeAliases Parameter are not consistent resolved #​1034 After updating to KSP 1.7.0, Missing information occurs in some cases that are configured in Java. #​1039 Support class extraction provided by annotation #​1063 Memory leak: org.sqlite.JDBC holds classloader of KSP

    Contributors

    Thank you for the pull requests! @​Jeffset @​midery @​jameskleeh @​Bencodes @​heli-os

    v1.7.20-1.0.6

    Compare Source

    KSP 1.0.6 for Kotlin 1.7.20


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 1
  • Update ksp to v1.7.20-1.0.6

    Update ksp to v1.7.20-1.0.6

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | com.google.devtools.ksp (source) | plugin | patch | 1.7.10-1.0.6 -> 1.7.20-1.0.6 | | com.google.devtools.ksp:symbol-processing-gradle-plugin (source) | dependencies | patch | 1.7.10-1.0.6 -> 1.7.20-1.0.6 |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 1
  • Don't skip on empty sources in LocTask

    Don't skip on empty sources in LocTask

    We want to always run this because not every module has source files. In those cases we want to just write an empty JSON object for tasks that depend on this task's outputs. This fixes an issue we would see in resources-only projects

    opened by ZacSweers 1
  • Update renovatebot/github-action action to v32.152.0

    Update renovatebot/github-action action to v32.152.0

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | renovatebot/github-action | action | minor | v32.151.2 -> v32.152.0 |


    Release Notes

    renovatebot/github-action

    v32.152.0

    Compare Source

    See the the changelog for changes in all releases.

    32.152.0 (2022-08-08)

    Bug Fixes
    • deps: update dependency renovate/renovate to v32.152.0 (e668c28)

    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 1
  • Update moshix to v0.21.0

    Update moshix to v0.21.0

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | dev.zacsweers.moshix | plugin | minor | 0.20.0 -> 0.21.0 | | dev.zacsweers.moshix:moshi-gradle-plugin | dependencies | minor | 0.20.0 -> 0.21.0 |


    Release Notes

    ZacSweers/MoshiX

    v0.21.0

    Compare Source

    2022-12-28

    New: Update to Kotlin 1.8.0.
    • For moshi-ir, this release is only compatible with Kotlin 1.8 or later.
    • Migrate the IR and FIR plugins to new CompilerPluginRegistrar entrypoint API.
    New: Experimental support for the new K2 compiler in moshi-ir.

    Note this comes with several caveats:

    • There is no FIR plugin in moshi-ir itself (not needed). This just marks itself as compatible with the new compiler and avoids using incompatible IR APIs.
    • This only works if proguard rule generation is disabled, as there is no support in FIR currently for generating files.
    • K2 compiler itself is extremely experimental.

    In short, this is only really to unblock anyone doing their own testing of K2 and don't want this plugin to disable it. If you see any issues, please file a bug here and disable K2 in your project in the meantime.

    Misc
    • Update JVM target to 11.
    • Update Anvil compiler-utils to 2.4.3.

    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 0
  • Update dependency com.vanniktech.maven.publish to v0.23.1

    Update dependency com.vanniktech.maven.publish to v0.23.1

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | com.vanniktech.maven.publish | plugin | minor | 0.22.0 -> 0.23.1 |


    Release Notes

    vanniktech/gradle-maven-publish-plugin

    v0.23.1

    Compare Source

    • also support publishing sources for the java-test-fixtures plugin in Kotlin/JVM projects
    • suppress Gradle warnings when publishing a project that uses java-test-fixtures

    v0.23.0

    Compare Source

    Updated docs can be found on the new website.

    • NEW: It is now possible to set group id, artifact id directly through the DSL
      mavenPublishing {
        coordinates("com.example", "library", "1.0.3")
      }
      
    • project.group and project.version will still be used as default values for group and version if the GROUP/VERSION_NAME Gradle properties do not exist and coordinates was not called, however there are 2 behavior changes:
      • The GROUP and VERSION_NAME Gradle properties take precedence over project.group and project.version instead of being overwritten by them. If you need to define the properties but replace them for some projects, please use the new coordinates method instead.
      • The GROUP and VERSION_NAME Gradle properties will not be explicitly set as project.group and project.version anymore.
    • NEW: Added dropRepository task that will drop a Sonatype staging repository. It is possible to specify which repository to drop by adding a --repository parameter with the id of the staging repository that was printed during publish. If no repository is specified and there is only one staging repository, that one will be dropped.
    • Added workaround to also publish sources for the java-test-fixtures plugin
    • Fixed publishing Kotlin/JS projects with the base plugin.
    • Fixed that a POM configured through the DSL is incomplete when publishing Gradle plugins.
    • The minimum supported Gradle version has been increased to 7.3.

    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    opened by slack-oss-bot 0
  • Reconsider memory args for daemons

    Reconsider memory args for daemons

    Currently we split memory 75/25 for kotlin and gradle daemons. This was to give more precedence to kotlin compilations, but this ends up OOMing gradle syncs and a number of other gradle-daemon-heavy tasks otherwise. Should we retool this to 50/50?

    opened by ZacSweers 0
  • Logging throws an exception during cleans

    Logging throws an exception during cleans

    io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.io.FileNotFoundException: /Users/zacsweers/dev/android/personal/CatchUp/build/outputs/logs/last-build-thermals.log (No such file or directory)
            at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:718)
            at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:715)
            at io.reactivex.rxjava3.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableScanSeed$ScanSeedObserver.onError(ObservableScanSeed.java:118)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onError(ObservableDoOnEach.java:117)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:97)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableFilter$FilterObserver.onNext(ObservableFilter.java:52)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:63)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableInterval$IntervalObserver.run(ObservableInterval.java:82)
            at io.reactivex.rxjava3.internal.schedulers.ScheduledDirectPeriodicTask.run(ScheduledDirectPeriodicTask.java:35)
            at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
            at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
            at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
            at java.base/java.lang.Thread.run(Thread.java:833)
    Caused by: java.io.FileNotFoundException: /Users/zacsweers/dev/android/personal/CatchUp/build/outputs/logs/last-build-thermals.log (No such file or directory)
            at java.base/java.io.FileOutputStream.open0(Native Method)
            at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
            at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
            at kotlin.io.FilesKt__FileReadWriteKt.appendBytes(FileReadWrite.kt:115)
            at kotlin.io.FilesKt__FileReadWriteKt.appendText(FileReadWrite.kt:142)
            at kotlin.io.FilesKt__FileReadWriteKt.appendText$default(FileReadWrite.kt:142)
            at slack.gradle.util.AppleSiliconThermals$start$4.accept(ThermalsWatcher.kt:297)
            at slack.gradle.util.AppleSiliconThermals$start$4.accept(ThermalsWatcher.kt:266)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:93)
            ... 10 more
    Exception in thread "RxComputationThreadPool-6" io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.io.FileNotFoundException: /Users/zacsweers/dev/android/personal/CatchUp/build/outputs/logs/last-build-thermals.log (No such file or directory)
            at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:718)
            at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:715)
            at io.reactivex.rxjava3.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableScanSeed$ScanSeedObserver.onError(ObservableScanSeed.java:118)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onError(ObservableDoOnEach.java:117)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:97)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableFilter$FilterObserver.onNext(ObservableFilter.java:52)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:63)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableInterval$IntervalObserver.run(ObservableInterval.java:82)
            at io.reactivex.rxjava3.internal.schedulers.ScheduledDirectPeriodicTask.run(ScheduledDirectPeriodicTask.java:35)
            at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
            at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
            at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
            at java.base/java.lang.Thread.run(Thread.java:833)
    Caused by: java.io.FileNotFoundException: /Users/zacsweers/dev/android/personal/CatchUp/build/outputs/logs/last-build-thermals.log (No such file or directory)
            at java.base/java.io.FileOutputStream.open0(Native Method)
            at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
            at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
            at kotlin.io.FilesKt__FileReadWriteKt.appendBytes(FileReadWrite.kt:115)
            at kotlin.io.FilesKt__FileReadWriteKt.appendText(FileReadWrite.kt:142)
            at kotlin.io.FilesKt__FileReadWriteKt.appendText$default(FileReadWrite.kt:142)
            at slack.gradle.util.AppleSiliconThermals$start$4.accept(ThermalsWatcher.kt:297)
            at slack.gradle.util.AppleSiliconThermals$start$4.accept(ThermalsWatcher.kt:266)
            at io.reactivex.rxjava3.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:93)
            ... 10 more
    
    
    opened by ZacSweers 0
  • Add configuration for specifying detekt ruleset dependencies

    Add configuration for specifying detekt ruleset dependencies

    A gradle property with a comma-separated list of library aliases that should be added to detekt rulesets when detekt's gradle plugin is applied. This would allow us to more readily use things like https://twitter.github.io/compose-rules

    enhancement 
    opened by ZacSweers 0
Releases(0.4.0)
  • 0.4.0(Dec 29, 2022)

    • Update to Kotlin 1.8.0. This plugin now requires Kotlin 1.8.0 or later as it only configures KGP's new compilerOptions API now.

    What's Changed

    • Update dependencyAnalysisPlugin to v1.18.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/197
    • Update to Kotlin 1.8.0 by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/166

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.8...0.4.0

    Source code(tar.gz)
    Source code(zip)
  • 0.3.8(Dec 22, 2022)

  • 0.3.7(Dec 22, 2022)

  • 0.3.6(Dec 15, 2022)

    • Backport android.packagingOptions.jniLibs.pickFirst for AGP 8.x compatibility, as the returned type by jniLibs changed from JniLibsPackagingOptions to JniLibsPackaging.

    What's Changed

    • Backport new jniLibs access in AGP 8 handling by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/187
    • Update plugin com.gradle.enterprise to v3.12 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/186
    • Update dependency org.jetbrains:markdown to v0.3.4 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/185
    • Update dependency org.jetbrains:markdown to v0.3.5 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/188

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.5...0.3.6

    Source code(tar.gz)
    Source code(zip)
  • 0.3.5(Dec 15, 2022)

    • Introduce compileCiUnitTest lifecycle task to just compile (but not run!) unit tests that are run by ciUnitTest.

    What's Changed

    • Update moshix to v0.20.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/181
    • Add compileCiUnitTest lifecycle task by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/182

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.4...0.3.5

    Source code(tar.gz)
    Source code(zip)
  • 0.3.4(Dec 5, 2022)

    • Only enable isIncludeAndroidResources in Android unit tests automatically when robolectric() is used.

    What's Changed

    • Update dependencyAnalysisPlugin to v1.14.1 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/163
    • Update dependency com.github.ben-manes.versions to v0.44.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/161
    • Update dependency com.bugsnag:bugsnag-android-gradle-plugin to v7.4.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/159
    • Update dependency com.android.tools.build:gradle to v8.0.0-alpha08 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/152
    • Enable build scans by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/154
    • Update dependency com.github.oshi:oshi-core to v6.3.1 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/153
    • Update dependencyAnalysisPlugin to v1.15.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/167
    • Update plugin com.gradle.enterprise to v3.11.4 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/165
    • Update dependency com.github.oshi:oshi-core to v6.3.2 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/164
    • Update ksp to v1.7.21-1.0.8 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/155
    • Update plugin bestPracticesPlugin to v0.8 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/135
    • Update detekt to v1.22.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/168
    • Update dependency org.jetbrains.kotlin.jvm to v1.7.21 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/156
    • Update dependency com.github.oshi:oshi-core to v6.4.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/175
    • Update spotless to v6.12.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/170
    • Update dependency gradle to v7.6 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/171
    • Update dependency org.jetbrains.kotlin.jvm to v1.7.22 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/172
    • Update dependencyAnalysisPlugin to v1.17.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/169
    • Update dependency com.android.tools.build:gradle to v8.0.0-alpha09 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/174
    • Update ksp to v1.7.22-1.0.8 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/173
    • Only enable androidResources in tests if robolectric is requested by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/176
    • Update dependency dev.zacsweers.redacted:redacted-compiler-plugin-gradle to v1.2.1 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/180

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.3...0.3.4

    Source code(tar.gz)
    Source code(zip)
  • 0.3.3(Nov 11, 2022)

    • Add some more Kotlin compiler arguments to compilations. See #160.

    What's Changed

    • Add some new compiler args by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/160

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.2...0.3.3

    Source code(tar.gz)
    Source code(zip)
  • 0.3.2(Nov 11, 2022)

    • (Strict mode only) Check for AndroidManifest.xml files in androidTest sources + ensure they're debuggable.

    What's Changed

    • Update to ktfmt 0.41 by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/157
    • Check that androidTest sources have manifests by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/158

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.1...0.3.2

    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Oct 20, 2022)

    • Exclude **/build/** from Detekt tasks.

    What's Changed

    • Exclude build dirs from detekt by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/151
    • Update dependency com.android.tools.build:gradle to v8.0.0-alpha05 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/148
    • Update dependency com.github.ben-manes.versions to v0.43.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/149
    • Update dependency com.github.oshi:oshi-core to v6.3.0 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/150

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.3.0...0.3.1

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Oct 14, 2022)

    Highlights

    • New: Support com.android.test projects.
    • New: Preliminary support for AGP 8.x.
    • Automatically add compose compiler dep in Compose multiplatform (i.e. org.jetbrains.compose) projects.
    • Support Error Prone Gradle Plugin 3.x.
    • Update me.tongfei:progressbar to 0.9.5.

    What's Changed

    • Update dependency org.jetbrains.dokka to v1.7.20 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/140
    • Automatically add compose compiler dep in multiplatform projects by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/139
    • Update dependency me.tongfei:progressbar to v0.9.5 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/138
    • Update error prone gradle plugin by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/144
    • Update KSP to 1.7.20-1.0.7 by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/142
    • Add support for android test projects by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/141
    • Update agp to v7.3.1 by @slack-oss-bot in https://github.com/slackhq/slack-gradle-plugin/pull/146
    • Add support for AGP 8 by @ZacSweers in https://github.com/slackhq/slack-gradle-plugin/pull/145

    Full Changelog: https://github.com/slackhq/slack-gradle-plugin/compare/0.2.4...0.3.0

    Source code(tar.gz)
    Source code(zip)
  • 0.2.4(Oct 7, 2022)

  • 0.2.3(Oct 3, 2022)

  • 0.2.2(Oct 3, 2022)

    • Add necessary --add-opens to Test tasks for Robolectric 4.9+ when it's enabled.
    • Avoid subprojects module stats and allprojects in bootstrap for better project isolation support.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Sep 27, 2022)

    • Fix: New androidTest(allowedVariants = ...) wasn't running on com.android.application projects.
    • Fix: Configure Lint DSL block for com.android.library and org.jetbrains.kotlin.jvm projects too.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Sep 23, 2022)

    • Add option to enable only certain variants' android tests.
    slack {
      android {
        features {
          androidTest(allowedVariants = setOf("internalDebug"))
        }
      }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Sep 8, 2022)

  • 0.1.0(Sep 8, 2022)

    • Update to Moshi 1.14.0.
    • Disable Instantiatable lint in min SDK 28+ due to lint bug.
    • Specify kotlin version in compose compatibility check.
    Source code(tar.gz)
    Source code(zip)
Owner
Slack
On a mission to make your working life simpler, more pleasant and more productive.
Slack
A Gradle plugin that generates plugin.yml for Bukkit/BungeeCord/Nukkit plugins based on the Gradle project

plugin-yml is a simple Gradle plugin that generates the plugin.yml plugin description file for Bukkit plugins, bungee.yml for Bungee plugins or nukkit.yml for Nukkit plugins based on the Gradle project. Various properties are set automatically (e.g. project name, version or description) and additional properties can be added using a simple DSL.

Plexus 0 Apr 10, 2022
Gradle plugin to check, if rest-controllers are used by clients and clients have suitable rest-interfaces

Verify-Feign Gradle Plugin This plugin will help you to verify all rest-clients and -controllers in a multimodule spring project. It will check, if al

null 3 May 11, 2022
Gradle Plugin to automatically upgrade your gradle project dependencies and send a GitHub pull request with the changes

Gradle Plugin to automatically upgrade your gradle project dependencies and send a GitHub pull request with the changes

Dipien 142 Dec 29, 2022
Gradle Plugin that allows you to decompile bytecode compiled with Jetpack Compose Compiler Plugin into Java and check it

decomposer Gradle Plugin that allows you to decompile bytecode compiled with Jetpack Compose Compiler Plugin into Java and check it How to use Run bui

Takahiro Menju 56 Nov 18, 2022
Gradle Plugin for Continuous Integration of AppSweep App Testing.

This Gradle plugin can be used to continuously integrate app scanning using AppSweep into your Android app build process

Guardsquare 28 Nov 13, 2022
EasyVersion is a Gradle plugin that manage your app or library version.

EasyVersion EasyVersion is a Gradle plugin that manage your app or library version. Before Downloading Create easy_version.json in your root project d

Kosh Sergani 8 Nov 26, 2022
Android Gradle Plugin -- Auto Check big image and compress image in building.

McImage I will continue to update, please rest assured to use δΈ­ζ–‡ζ–‡ζ‘£ AndroidδΌ˜ι›…ηš„ζ‰“εŒ…ζ—Άθ‡ͺεŠ¨εŒ–θŽ·ε–ε…¨ιƒ¨res衄源 McImage is a Non-invasive plugin for compress all res in

smallSohoSolo 1.1k Dec 28, 2022
Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms.

CompleteKotlin Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms. What this plugin provides This zero-conf

Louis CAD 235 Jan 3, 2023
A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.

Change Tracker Plugin A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes

Ismael Di Vita 110 Dec 19, 2022
Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.

Multiplatform Swift Package This is a Gradle plugin for Kotlin Multiplatform projects that generates an XCFramework for your native Apple targets and

Georg Dresler 262 Jan 5, 2023
Gradle Plugin for publishing artifacts to Sonatype and Nexus

Introduction Due to Sonatype's strict validation rules, the publishing requirement must be satisfied by every artifact which wants to be published to

Johnson Lee 21 Oct 14, 2022
Gradle plugin that parses version updates and assigns them to groups of people.

Notifier Gradle Plugin This gradle plugin serves the need of automating how dependencies are handles in a project. More specifically, it functions usi

Plum 4 Oct 27, 2022
A Gradle plugin enforcing pre-commit and commit-msg Git hooks configuration

A Gradle plugin enforcing pre-commit and commit-msg Git hooks configuration. Conventional-commits-ready.

Danilo Pianini 24 Dec 16, 2022
Klinker is a gradle plugin making it possible to link kotlin native executables with custom linkers and options.

Klinker is a gradle plugin making it possible to link kotlin native executables with custom linkers and options. It does this by creating a static library for kotlin compilation, then generates a c+kotlin wrapper that calls into kotlin to start the app, finally using the specified compiler to compile and link the c code and kotlin library into a binary.

Jason Monk 4 Apr 14, 2022
Kmp4free - A Gradle Plugin that allows seamless switching between Kotlin JVM and the Kotlin Multiplatform Plugins

?? kmp4free Allows you to toggle between Kotlin JVM Plugin -> Kotlin Multiplatform with a Gradle Property kmp4free=true. This Gradle Plugin was built

Sam Edwards 61 Oct 14, 2022
A simple gradle plugin that lets you create a download asset from zeplin and convert them to vector drawables automatically

A simple gradle plugin that lets you create a download asset from zeplin and convert them to vector drawables automatically elephant project using 100% Kotlin and be up and running in a few seconds.

Qifan Yang 21 Sep 21, 2022
A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs.

A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs.

Rikka apps 124 Dec 31, 2022
Grazel is a Gradle plugin to automate generation of valid Bazel files for a given Android/Kotlin/Java project.

Grazel Grazel stands for Gradle to Bazel. It is a Gradle plugin that enables you to migrate Android projects to Bazel build system in an incremental a

Grab 228 Jan 2, 2023
A Gradle plugin helps to proxy all the BuildConfig fields in the Android project.

Readme A Gradle plugin helps to proxy all the BuildConfig fields in the Android project. Background In android BuildConfig, We might have different co

Jack Chen 4 Oct 11, 2021