Extract the bulk of shared gradle logic into script plugins [ci full].#4194
Extract the bulk of shared gradle logic into script plugins [ci full].#4194
Conversation
| // } | ||
| // } | ||
| // | ||
| // However, it doesn't work when factored out into this script. |
There was a problem hiding this comment.
Specifically, if I try to do the previous snippet in this build script, gradle tries to look up org.jetbrains.... as a property on $project, which fails. Maybe there's some trick I don't know about to have it looked up as a global package name?
There was a problem hiding this comment.
More concerningly, I don't know how to test whether this change has broken whatever AndroidX thing it was introduced to address; our ./gradlew test still passes and an a-c test run seems to be going OK so far. I'll try a Fenix build with locally-published components as well for completeness.
There was a problem hiding this comment.
I'll try a Fenix build with locally-published components as well for completeness.
I can't build Fenix against latest a-c right now, looks like there might be a refactor in progress that needs updates in Fenix. Will try again later, but definitely want to do a full test run on Fenix before merging this.
There was a problem hiding this comment.
It took me a bit of fiddling around to find the right combo of branches, but I have successfully build Fenix against a local publish of appservices and a-c with these changes in place, and confirmed that sync- and accounts-related functionality is working as expected
| testImplementation "org.mockito:mockito-core:$mockito_core_version" | ||
|
|
||
| androidTestImplementation "com.android.support.test:runner:$android_test_runner_version" | ||
| androidTestImplementation "com.android.support.test.espresso:$espresso_core_version" |
There was a problem hiding this comment.
A handful of our current components to not currently depend on all of these test dependencies, so this change will introduce a few potentially-spurious test dependencies in a few of our packages. That seems fine to me, but that may be because I wouldn't be the one paying the cost of those dependencies. Thoughts?
Codecov Report
@@ Coverage Diff @@
## taskcluster-test-all-at-once #4194 +/- ##
=============================================================
Coverage 74.86% 74.86%
=============================================================
Files 45 45
Lines 4011 4011
=============================================================
Hits 3003 3003
Misses 1008 1008 Continue to review full report at Codecov.
|
|
@jhugman how do you feel about this from a Nimbus PoV? |
mhammond
left a comment
There was a problem hiding this comment.
This looks great to me, although I suggest you still wait for a review from someone who actually knows something about gradle
aa9766e to
8d4fb69
Compare
9aaa8d5 to
0f173e1
Compare
|
This is starting to get stale, and it really seems like an easy-to-reverse-if-we-hate-it change to me, so I'm going to rebase this and get it merged. |
163a41d to
e2be243
Compare
6065443 to
d27cb2c
Compare
|
(Actually, I still need to do a final test and build with Fenix before merging this, which I will do shortly) |
d27cb2c to
12d82f0
Compare
Prior to this commit, the `build.gradle` for each individual project contained copy-pasted logic for configuring Android and protobuf. Some of them were even using slightly different versions of the same dependencies. With this commit, there are two new gradle scripts that encapsulate this shared logic: * ./build-scripts/component-common.gradle, for basic Android and Kotlin setup. * ./build-scripts/protobuf-common.gradle, for configuration specific to the protobuf plugin. Hopefully this will make the logic easier to maintain going forward.
12d82f0 to
d633b2c
Compare
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
This uses the new, cleaner factoring of our Android config from #4194 as an excuse to update some of our Android dependencies to bring them inline with what's used in current android-components. It was much easier than it has been in the past!
Prior to this commit, the
build.gradlefor each individualproject contained copy-pasted logic for configuring Android
and protobuf. Some of them were even using slightly different
versions of the same dependencies.
This this commit, there are two new gradle scripts that encapsulate
this shared logic:
and Kotlin setup.
to the protobuf plugin.
Hopefully this will make the logic easier to maintain going forward.
There may be gradle-related reasons that we shouldn't do this, so
I will reach out to some Android experts for a review. But even if this
makes our builds slightly slower, I think its a win overall for a team
of non-gradle-experts who need tomaintain this stuff.