This repository was archived by the owner on Jun 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Migrated sample to more modern approach #333
Open
Evleaps
wants to merge
3
commits into
dropbox:main
Choose a base branch
from
Evleaps:migrate-sample-to-more-modern-version
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,4 +39,4 @@ allprojects { | |
|
|
||
| task clean(type: Delete) { | ||
| delete rootProject.buildDir | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import com.dropbox.affectedmoduledetector.AffectedModuleConfiguration | ||
|
|
||
| plugins { | ||
| alias(libs.plugins.android.application) apply false | ||
| alias(libs.plugins.android.library) apply false | ||
| alias(libs.plugins.kotlin.android) apply false | ||
| alias(libs.plugins.ktlint) | ||
| alias(libs.plugins.detekt) apply false | ||
| alias(libs.plugins.affected.module.detector) | ||
| id("affected-tests-plugin") // custom plugin based on AMD | ||
| id("affected-tasks-plugin") // custom plugin based on AMD | ||
| } | ||
|
|
||
| affectedModuleDetector { | ||
| baseDir = project.rootDir.toString() | ||
| pathsAffectingAllModules = setOf( | ||
| "build_configuration/", | ||
| ) | ||
| specifiedBranch = "origin/main" | ||
| compareFrom = "SpecifiedBranchCommitMergeBase" | ||
| customTasks = setOf( | ||
| AffectedModuleConfiguration.CustomTask( | ||
| "runDetektByImpact", | ||
| "detekt", | ||
| "Run static analysis tool by Impact analysis", | ||
| ), | ||
| ) | ||
| logFolder = project.rootDir.toString() | ||
| excludedModules = setOf( | ||
| "sample-util", | ||
| ) | ||
| } | ||
|
|
||
| tasks.register<Delete>("clean") { | ||
| delete(rootProject.layout.buildDirectory) | ||
| } |
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
sample/buildSrc/src/main/kotlin/com/dropbox/sample/Dependencies.kt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...Src/src/main/resources/META-INF/gradle-plugins/com.dropbox.affectedtasksplugin.properties
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...c/main/resources/META-INF/gradle-plugins/com.dropbox.sample.AffectedTestPlugin.properties
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| * Copyright (c) 2020, Dropbox, Inc. All rights reserved. | ||
| */ | ||
| plugins { | ||
| alias(libs.plugins.kotlin.jvm) | ||
| `java-gradle-plugin` | ||
| } | ||
|
|
||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| mavenLocal() | ||
| } | ||
|
|
||
| gradlePlugin { | ||
| plugins { | ||
| register("affected-tests-plugin") { | ||
| id = "affected-tests-plugin" | ||
| implementationClass = "com.dropbox.affectedmoduledetector.AffectedTestsPlugin" | ||
| } | ||
| register("affected-tasks-plugin") { | ||
| id = "affected-tasks-plugin" | ||
| implementationClass = "com.dropbox.affectedmoduledetector.AffectedTasksPlugin" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(libs.affected.module.detector) | ||
| testImplementation(libs.junit) | ||
| testImplementation(libs.mockito.kotlin) | ||
| testImplementation(libs.google.truth) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| dependencyResolutionManagement { | ||
| versionCatalogs { | ||
| create("libs") { | ||
| from(files("../gradle/libs.versions.toml")) | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| [versions] | ||
| kotlin = "2.3.0" | ||
| detekt = "1.23.8" | ||
| coreKtx = "1.17.0" | ||
| appCompat = "1.7.1" | ||
| material = "1.13.0" | ||
| constraintlayout = "2.2.1" | ||
| junit = "4.13.2" | ||
| androidxTestExt = "1.3.0" | ||
| espressoCore = "3.7.0" | ||
| androidGradlePlugin = "8.13.2" | ||
| affectedModuleDetector = "0.6.2" | ||
| ktlint = "14.0.1" | ||
| mockitoKotlin = "1.6.0" | ||
| googleTruth = "1.4.5" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: all deps were updated to latest versions |
||
|
|
||
| [libraries] | ||
| kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" } | ||
| androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appCompat" } | ||
| android-material = { group = "com.google.android.material", name = "material", version.ref = "material" } | ||
| androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } | ||
| junit = { group = "junit", name = "junit", version.ref = "junit" } | ||
| androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidxTestExt" } | ||
| androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } | ||
| affected-module-detector = { module = "com.dropbox.affectedmoduledetector:affectedmoduledetector", version.ref = "affectedModuleDetector" } | ||
| mockito-kotlin = { group = "com.nhaarman", name = "mockito-kotlin", version.ref = "mockitoKotlin" } | ||
| google-truth = { group = "com.google.truth", name = "truth", version.ref = "googleTruth" } | ||
|
|
||
| [plugins] | ||
| android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } | ||
| android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } | ||
| kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
| ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } | ||
| detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } | ||
| kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } | ||
| affected-module-detector = { id = "com.dropbox.affectedmoduledetector", version.ref = "affectedModuleDetector" } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why I renamed commands here?
This is not AMD source, this is sample application where were demonstrated how to create custom plugin/configuration using AMD API. The goal is not to override existing commands provided by AMD but show how to register own gradle commands which is using AMD API.
As the original commands already taken by AMD we creates new custom commands with a bit different (own) behaviour
Lem me know if I wrong