Migrated sample to more modern approach #333
Conversation
…ced buildSrc with build convention
|
|
| * gradlew assembleAffectedAndroidTests - assembles but does not run on device tests, useful when working with device labs | ||
| * gradlew runCustomAffectedUnitTests - runs jvm tests | ||
| * gradlew runCustomAffectedAndroidUnitTests - runs connected tests | ||
| * gradlew customAssembleAffectedAndroidTests - assembles but does not run on device tests, useful when working with device labs |
There was a problem hiding this comment.
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
| affectedModuleDetector = "0.6.2" | ||
| ktlint = "14.0.1" | ||
| mockitoKotlin = "1.6.0" | ||
| googleTruth = "1.4.5" |
There was a problem hiding this comment.
note: all deps were updated to latest versions
| } | ||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_17 | ||
| targetCompatibility = JavaVersion.VERSION_17 |
There was a problem hiding this comment.
note: migrated from 11 to 17 according gradle recomendation
|
|
||
| android { | ||
| namespace = "com.dropbox.detector.sample_util" | ||
| compileSdk = 36 |
There was a problem hiding this comment.
compileSdk & targetSdk was changed from 34 to 36
Goal:
The current sample looks outdated. Beginners who use the sample for testing may face the need to adapt it to modern standards. This makes it harder to understand how the plugin works and how to configure it.
Action:
To reduce the entry barrier for configuring the plugin in a project and to improve its testability with the latest library versions, I made the following changes to the sample: