Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 53
Migrated sample to more modern approach #333
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -39,4 +39,4 @@ allprojects { | ||
| task clean(type: Delete) { | ||
| delete rootProject.buildDir | ||
| } | ||
| } | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| 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) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| dependencyResolutionManagement { | ||
| versionCatalogs { | ||
| create("libs") { | ||
| from(files("../gradle/libs.versions.toml")) | ||
| } | ||
| } | ||
| } |
| 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" | ||
ContributorAuthor 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" } | ||
| 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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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