From 6f0a25688a578222c5fb19e14f23c59b6d37df44 Mon Sep 17 00:00:00 2001 From: Vladislav Ermolin Date: Fri, 12 Jun 2026 17:55:31 +0300 Subject: [PATCH] Configure publishing to happen under Flo org. --- .github/workflows/ci_test_and_publish.yml | 8 ++--- LICENSE | 2 ++ README.md | 32 +++++++------------ RELEASING.md | 12 +++---- .../AffectedModuleDetectorIntegrationTest.kt | 6 ++-- gradle.properties | 18 +++++------ sample/build.gradle | 2 +- sample/buildSrc/build.gradle.kts | 2 +- 8 files changed, 37 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci_test_and_publish.yml b/.github/workflows/ci_test_and_publish.yml index 8cfbb4b5..ca7be2fc 100644 --- a/.github/workflows/ci_test_and_publish.yml +++ b/.github/workflows/ci_test_and_publish.yml @@ -13,7 +13,7 @@ on: jobs: publish: runs-on: ubuntu-latest - if: github.repository == 'dropbox/AffectedModuleDetector' && github.ref == 'refs/heads/main' + if: github.repository == 'flo-health/AffectedModuleDetector' && github.ref == 'refs/heads/main' steps: - name: Checkout @@ -28,8 +28,8 @@ jobs: - name: Upload Artifacts run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel env: - ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} @@ -64,5 +64,3 @@ jobs: script: ./gradlew assemble testCoverage env: API_LEVEL: ${{ matrix.api-level }} - - name: Upload code coverage - run: bash <(curl -s https://codecov.io/bash) diff --git a/LICENSE b/LICENSE index 6c54b492..13cd8db8 100644 --- a/LICENSE +++ b/LICENSE @@ -190,6 +190,8 @@ Copyright (c) 2019 Dropbox, Inc. + Copyright 2026 Flo Health, Inc. + 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 diff --git a/README.md b/README.md index 8977ecf1..921b7ef9 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,13 @@ # Affected Module Detector -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.dropbox.affectedmoduledetector/affectedmoduledetector/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.dropbox.affectedmoduledetector/affectedmoduledetector/) - -[![Build Status](https://travis-ci.org/dropbox/AffectedModuleDetector.svg?branch=main)](https://travis-ci.org/dropbox/AffectedModuleDetector) - -[![codecov](https://codecov.io/gh/dropbox/AffectedModuleDetector/branch/main/graph/badge.svg)](https://codecov.io/gh/dropbox/AffectedModuleDetector) - A Gradle Plugin to determine which modules were affected by a set of files in a commit. One use case for this plugin is for developers who would like to only run tests in modules which have changed in a given commit. +This project is a fork of https://github.com/dropbox/AffectedModuleDetector, originally developed by **Dropbox**. We thank Dropbox for their work and contributions. + ## Overview The AffectedModuleDetector will look at the last commit and determine which files have changed, it will then build a dependency graph of all the modules in the project. The detector exposes a set of APIs which can be used to determine whether a module was considered affected. -### ⚠️ Maintenance Status - -Affected Module Detector is in maintenance mode. - -Only critical fixes may be merged. There are no plans for new features and no guaranteed support timeline. See [this issue](https://github.com/dropbox/AffectedModuleDetector/issues/335) for details and ownership discussion. - ### Git The module detector assumes that it is being applied to a project stored in git and a git client is present on the system. It will query the last commit on the current branch to determine the list of files changed. @@ -56,7 +46,7 @@ pluginManagement { // root build.gradle(.kts) plugins { - id("com.dropbox.affectedmoduledetector") version "" + id("health.flo.affectedmoduledetector") version "" } ``` @@ -71,16 +61,16 @@ buildscript { mavenCentral() } dependencies { - classpath "com.dropbox.affectedmoduledetector:affectedmoduledetector:" + classpath "health.flo.affectedmoduledetector:affectedmoduledetector:" } } //rootproject -apply plugin: "com.dropbox.affectedmoduledetector" +apply plugin: "health.flo.affectedmoduledetector" ``` If you want to develop a plugin using the APIs, add this to your `buildSrc`'s `dependencies` list: ``` -implementation("com.dropbox.affectedmoduledetector:affectedmoduledetector:") +implementation("health.flo.affectedmoduledetector:affectedmoduledetector:") ``` ## Configuration @@ -133,7 +123,7 @@ affectedModuleDetector { - `excludedModules`: A list of modules that will be excluded from the build process, can be the name of a module, or a regex against the module gradle path - `includeUncommitted`: If uncommitted files should be considered affected - `top`: The top of the git log to use. Must be used in combination with configuration `includeUncommitted = false` - - `customTasks`: set of [CustomTask](https://github.com/dropbox/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleConfiguration.kt) + - `customTasks`: set of [CustomTask](https://github.com/flo-health/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleConfiguration.kt) By default, the Detector will look for `assembleAndroidDebugTest`, `connectedAndroidDebugTest`, and `testDebug`. Modules can specify a configuration block to specify which variant tests to run: ```groovy @@ -226,8 +216,8 @@ You should see zero tests run. Make a change within one of the modules and commi ## Custom tasks If you want to add a custom gradle command to execute with impact analysis -you must declare [AffectedModuleConfiguration.CustomTask](https://github.com/dropbox/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleConfiguration.kt) -which is implementing the [AffectedModuleTaskType](https://github.com/dropbox/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleTaskType.kt) interface in the `build.gradle` configuration of your project: +you must declare [AffectedModuleConfiguration.CustomTask](https://github.com/flo-health/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleConfiguration.kt) +which is implementing the [AffectedModuleTaskType](https://github.com/flo-health/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleTaskType.kt) interface in the `build.gradle` configuration of your project: ```groovy // ... @@ -248,7 +238,7 @@ affectedModuleDetector { **NOTE:** Please, test all your custom commands. If your custom task doesn't work correctly after testing, it might be that your task is quite complex and to work correctly it must use more gradle api's. -Hence, you must create `buildSrc` module and write a custom plugin manually like [AffectedModuleDetectorPlugin](https://github.com/dropbox/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorPlugin.kt) +Hence, you must create `buildSrc` module and write a custom plugin manually like [AffectedModuleDetectorPlugin](https://github.com/flo-health/AffectedModuleDetector/blob/main/affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorPlugin.kt) ## Notes @@ -258,6 +248,8 @@ Special thanks to the AndroidX team for originally developing this project at ht Copyright (c) 2021 Dropbox, Inc. + Copyright 2026 Flo Health, Inc. + 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 diff --git a/RELEASING.md b/RELEASING.md index ccc26bf8..477a6988 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -8,9 +8,9 @@ Releasing 4. `git push && git push --tags` * This should be pushed to your fork. 5. Create a PR with this commit and merge it. - 6. Confirm the new artifacts are present in https://s01.oss.sonatype.org/content/repositories/releases/com/dropbox/affectedmoduledetector/affectedmoduledetector/ - * If the plugin fails to publish the release, you'll need to log into Sonatype and drop any repositories under 'Staging Repositories' and re-run the CI job to publish. - 7. Go to https://github.com/dropbox/AffectedModuleDetector/releases and `Draft a new release` from the tag you just created - 7. Update the top level `gradle.properties` to the next SNAPSHOT version. - 8. `git commit -am "Prepare next development version."` - 9. Create a PR with this commit and merge it. + 6. Confirm the new artifacts are present in https://repo1.maven.org/maven2/health/flo/affectedmoduledetector/affectedmoduledetector/ + * If the plugin fails to publish the release, you'll need to log into the Central Portal (central.sonatype.com) and discard the failed deployment, then re-run the CI job to publish. + 7. Go to https://github.com/flo-health/AffectedModuleDetector/releases and `Draft a new release` from the tag you've just created + 8. Update the top level `gradle.properties` to the next SNAPSHOT version. + 9. `git commit -am "Prepare next development version."` + 10. Create a PR with this commit and merge it. diff --git a/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt b/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt index 8d34d2bb..9babc827 100644 --- a/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt +++ b/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt @@ -23,7 +23,7 @@ class AffectedModuleDetectorIntegrationTest { ) tmpFolder.newFile("build.gradle").writeText( """plugins { - | id "com.dropbox.affectedmoduledetector" + | id "health.flo.affectedmoduledetector" |}""".trimMargin() ) @@ -64,7 +64,7 @@ class AffectedModuleDetectorIntegrationTest { | } |} |plugins { - | id "com.dropbox.affectedmoduledetector" + | id "health.flo.affectedmoduledetector" |} |allprojects { | repositories { @@ -156,7 +156,7 @@ class AffectedModuleDetectorIntegrationTest { | } |} |plugins { - | id "com.dropbox.affectedmoduledetector" + | id "health.flo.affectedmoduledetector" |} |affectedModuleDetector { | excludedModules = [ "sample-core" ] diff --git a/gradle.properties b/gradle.properties index 7b0e1cac..045ff760 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,25 +21,25 @@ android.enableJetifier=true kotlin.code.style=official # POM -GROUP = com.dropbox.affectedmoduledetector +GROUP = health.flo.affectedmoduledetector VERSION_NAME=0.6.3-SNAPSHOT POM_ARTIFACT_ID = affectedmoduledetector POM_NAME = Affected Module Detector POM_DESCRIPTION = A Gradle Plugin and library to determine which modules were affected in a commit. -POM_URL = https://github.com/dropbox/AffectedModuleDetector/ -POM_SCM_URL = https://github.com/dropbox/AffectedModuleDetector/ -POM_SCM_CONNECTION = scm:git:https://github.com/dropbox/AffectedModuleDetector.git -POM_SCM_DEV_CONNECTION = scm:git:git@github.com:dropbox/AffectedModuleDetector.git +POM_URL = https://github.com/flo-health/AffectedModuleDetector/ +POM_SCM_URL = https://github.com/flo-health/AffectedModuleDetector/ +POM_SCM_CONNECTION = scm:git:https://github.com/flo-health/AffectedModuleDetector.git +POM_SCM_DEV_CONNECTION = scm:git:git@github.com:flo-health/AffectedModuleDetector.git POM_LICENCE_NAME = The Apache License, Version 2.0 POM_LICENCE_URL = http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST = repo -POM_DEVELOPER_ID = mplat-dbx -POM_DEVELOPER_NAME = Dropbox -POM_DEVELOPER_URL = https://github.com/dropbox/ -POM_DEVELOPER_EMAIL = api-support@dropbox.com +POM_DEVELOPER_ID = flo-health +POM_DEVELOPER_NAME = Flo Health +POM_DEVELOPER_URL = https://github.com/flo-health/ +POM_DEVELOPER_EMAIL = android-opensource@flo.health mavenCentralAutomaticPublishing=true diff --git a/sample/build.gradle b/sample/build.gradle index 035333d4..39be784c 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -20,7 +20,7 @@ buildscript { } apply plugin: "org.jlleitschuh.gradle.ktlint" -apply plugin: "com.dropbox.affectedmoduledetector" +apply plugin: "health.flo.affectedmoduledetector" affectedModuleDetector { baseDir = "${project.rootDir}" diff --git a/sample/buildSrc/build.gradle.kts b/sample/buildSrc/build.gradle.kts index 9c8afa89..9b5f038c 100644 --- a/sample/buildSrc/build.gradle.kts +++ b/sample/buildSrc/build.gradle.kts @@ -13,7 +13,7 @@ repositories { } dependencies { - implementation("com.dropbox.affectedmoduledetector:affectedmoduledetector:0.6.3-SNAPSHOT") + implementation("health.flo.affectedmoduledetector:affectedmoduledetector:0.6.3-SNAPSHOT") testImplementation("junit:junit:4.13.1") testImplementation("com.nhaarman:mockito-kotlin:1.5.0") testImplementation("com.google.truth:truth:1.0.1")