Status Update
Comments
ds...@gmail.com <ds...@gmail.com> #2
We will to build CD pipelines with agents running in internal on-premise network, peered with GCP network. GKE private endpoint is not reachable in this case.
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com> #3
Ideally, we don't want to have public IP for K8S API at all and manage it privately inside the org with a hybrid architecture site-2-site VPN etc.
lo...@gmail.com <lo...@gmail.com> #4
vi...@google.com <vi...@google.com>
je...@google.com <je...@google.com> #6
lo...@gmail.com <lo...@gmail.com> #7
je...@google.com <je...@google.com> #8
ow...@google.com <ow...@google.com> #9
al...@google.com <al...@google.com> #10
al...@google.com <al...@google.com> #11
lo...@gmail.com <lo...@gmail.com> #12
This is true also for VPCs in the same project!
al...@google.com <al...@google.com> #13
al...@google.com <al...@google.com> #14
Jeff, can we set up atomically-versioned groups to treat within-group project(...)
dependency versions as strictly(version)
?
je...@google.com <je...@google.com> #15
It seems to me that the code in
Nowadays AndroidX is publishing Gradle module metadata; it might be more convenient for dependents to use that, which should be automatic if the corresponding AndroidX artifact was published with a .module file (for example,
Also related is it appears that the module metadata that we’re publishing doesn’t currently specify ‘strictly’ in this case, but I’ll look into that.
je...@google.com <je...@google.com> #16
Hmm, asked Gradle whether there was a convenient way to add these version constraints into the .module file when they are coming from project
dependencies in our build, and they suggested filing a feature request:
al...@google.com <al...@google.com> #17
Does pom
version specification is always considered by Gradle to be require
? Such that the suggestion in strictly
isn't something that can be expressed in a pom
. It wasn't entirely clear to me from the Gradle bug.
je...@google.com <je...@google.com> #19
Re
Yeah, according to require
, yeah.
je...@google.com <je...@google.com> #20
Re
Yeah, it is possible for a gradle module metadata file to specify a dependency version of strictly
but it's inconvenient to generate a file like that in our case where the original build dependencies are project
dependencies (
lo...@gmail.com <lo...@gmail.com> #21
Using a BoM can solve your problem I think. Otherwise, you can submit the feature request to have it be supported easily for project
dependencies.
se...@google.com <se...@google.com> #22
This would have helped developers avoid a crash in a mix of alpha and beta versions of emoji2:
al...@google.com <al...@google.com> #23
This would have addressed P1
issues every few months and building up code debt to work around this manually.
je...@google.com <je...@google.com> #24
Checking again on strictly()
constraints into .module files),
one of the ideas is
Does that appear to apply here? Should we ask Gradle again about whether there's an update?
al...@google.com <al...@google.com> #25
Whoops, we should have resolved that way earlier. No -- we don't want strictly
. This should always be reciprocal requires
constraints so that we upgrade instead of fail.
al...@google.com <al...@google.com> #26
Oh, and a fun hack we learned along the way! Aurimas had expressed concerns about project isolation.
If you express a constraint as though it's a prebuilt, e.g. implementation("myGroup:myLibraryA:${LibraryGroups.MY_GROUP.version}")
, then you won't have a configuration- or build-time dependency on the project; however, the constraint will still get emitted into the Gradle metadata. There's no need for an actual prebuilt to exist, since Gradle doesn't exercise the constraints until they are needed during dependency resolution. When they are exercised, Gradle will correctly resolve the constraint to the project.
ap...@google.com <ap...@google.com> #27
Branch: androidx-main
commit 6c501663bbadc83d2b2737583c2a5cc631ee1b15
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Wed Nov 02 16:52:05 2022
standardizing collection-benchmark.groupId to "collection"
(rather than null)
Bug: 146802533
Test: Treehugger run busytown/*.sh
Change-Id: I4e3c089bc3ffc15beea8b47bfa881fac621e1bc0
M collection/collection-benchmark/build.gradle
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #28
Branch: androidx-main
commit e7c8ef7a8eb416ca1a7480676bc2d39c5322c39d
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Nov 22 15:45:56 2022
Remove compose group/version environment variable override
It's probably unused; trying to use it currently results in a build failure
Bug: 146802533
Test: ./gradlew :buildSrc-tests:test
Test: Treehugger runs busytown/*.sh
Change-Id: Ib69c06a0fbf3912f3535da471a7145e999361d99
M buildSrc-tests/src/test/kotlin/androidx/build/LibraryVersionsServiceTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
M buildSrc/private/src/main/kotlin/androidx/build/LibraryVersionsService.kt
ap...@google.com <ap...@google.com> #29
Branch: androidx-main
commit 3bd54f3043c8f689fc41f0a42905c3bc01d35caa
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Wed Nov 02 16:25:51 2022
AndroidXExtension now offering a function for computing the groupId for a project path
and validating that the computed value matches the correct value
Bug: 146802533
Test: ./gradlew help
Change-Id: I186a790acbd5dcc064456d8a0edd86b2c9d07b52
M buildSrc-tests/src/test/kotlin/androidx/build/LibraryVersionsServiceTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
M buildSrc/private/src/main/kotlin/androidx/build/LibraryVersionsService.kt
M compose/material/material/icons/generator/build.gradle
M glance/glance-appwidget/glance-layout-generator/build.gradle
M libraryversions.toml
ap...@google.com <ap...@google.com> #30
Branch: androidx-main
commit c2520db73047b3aab1ab4b120f36eebedf85fc78
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Nov 29 16:04:09 2022
PrintProjectCoordinatesTask
So that when we compute groupId based on project path it will still be easy to see the groupId
Sample output from `./gradlew :annotation:annotation:printCoordinates :collection:collection:printCoordinates :core:core:printCoordinates`
> Task :annotation:annotation:printCoordinates
filepath: annotation/annotation/build.gradle (from settings.gradle)
group : androidx.annotation (from AndroidXExtension.kt)
artifact: annotation (from project name)
version : 1.6.0-alpha01 (from build.gradle: mavenVersion)
> Task :collection:collection:printCoordinates
filepath: collection/collection/build.gradle (from settings.gradle)
group : androidx.collection (from AndroidXExtension.kt)
artifact: collection (from project name)
version : 1.3.0-alpha03 (from group.atomicGroupVersion)
> Task :core:core:printCoordinates
filepath: core/core/build.gradle (from settings.gradle)
group : androidx.core (from AndroidXExtension.kt)
artifact: core (from project name)
version : 1.10.0-alpha01 (from build.gradle: mavenVersion)
Bug: 146802533
Test: ./gradlew printCoordinates
Test: ./gradlew :annotation:annotation:printCoordinates
Test: cd annotation/annotation && ../../gradlew printCoordinates
Change-Id: If58b511c1acdd8d2b1e7f0a2e90d1b3be21a743e
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
A buildSrc/private/src/main/kotlin/androidx/build/PrintProjectCoordinatesTask.kt
ap...@google.com <ap...@google.com> #31
Branch: androidx-main
commit 8ee2f6e5b06fbb4a318e1d337157e79e69b87a3e
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Wed Nov 30 13:24:25 2022
Validating that the autodetected groupId matches the explicitly set groupId for non-published projects too
so that when we set the groupId automatically in a followup change, none of the groupIds will change.
This requires setting a groupId in non-published projects.
This also requires setting LibraryType and Publish in some cases so that we can detect that these projects aren't published
Bug: 146802533
Test: run `./development/validateRefactor.sh HEAD^` and see that there aren't any differences relating to groupIds or to files being added or removed (although there are some differences in docs, which is a known issue:
Test: run `./gradlew tasks --all` with and without this change and see that the list of tasks is the same
Test: Treehugger runs busytown/*.sh
Change-Id: Ie4c5993872543745f6eada632a80de339bd08638
M ads/ads-identifier-benchmark/build.gradle
M ads/ads-identifier-testing/build.gradle
M annotation/annotation-experimental-lint/integration-tests/build.gradle
M annotation/annotation-sampled/build.gradle
M appcompat/appcompat-benchmark/build.gradle
M benchmark/benchmark/build.gradle
M buildSrc-tests/project-subsets/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
M car/app/app-samples/navigation/automotive/build.gradle
M car/app/app-samples/navigation/common/build.gradle
M car/app/app-samples/navigation/mobile/build.gradle
M car/app/app-samples/showcase/automotive/build.gradle
M car/app/app-samples/showcase/common/build.gradle
M car/app/app-samples/showcase/mobile/build.gradle
M collection/collection-benchmark-kmp/build.gradle
M compose/desktop/desktop/samples/build.gradle
M compose/foundation/foundation/benchmark/build.gradle
M compose/material/material-icons-extended-filled/build.gradle
M compose/material/material-icons-extended-outlined/build.gradle
M compose/material/material-icons-extended-rounded/build.gradle
M compose/material/material-icons-extended-sharp/build.gradle
M compose/material/material-icons-extended-twotone/build.gradle
M compose/material/material/benchmark/build.gradle
M compose/ui/ui/benchmark/build.gradle
M datastore/datastore-compose-samples/build.gradle
M datastore/datastore-sampleapp/build.gradle
M metrics/metrics-benchmark/build.gradle
M recyclerview/recyclerview-benchmark/build.gradle
M room/benchmark/build.gradle
M startup/startup-runtime-lint/build.gradle
M wear/compose/compose-material/benchmark/build.gradle
M wear/compose/compose-material3/benchmark/build.gradle
M wear/watchface/watchface-complications-data-source-samples/build.gradle
ap...@google.com <ap...@google.com> #32
Branch: androidx-main
commit fc3ebc8f51c75d415bbc9258f6bbafa0c8d13bc0
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Dec 20 15:03:26 2022
Extracting SettingsParser to where the main build can use it too
Thanks!
Bug: 146802533
Test: ./gradlew :buildSrc-tests:test
Test: cd playground-common/playground-plugin && ./gradlew test
Test: cd room && ./gradlew tasks
Change-Id: Iffc425e1337f8860f642f240389a44484a215c3b
M buildSrc-tests/src/test/kotlin/androidx/build/SettingsParserTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/SettingsParser.kt
M playground-common/playground-plugin/src/main/kotlin/androidx/playground/PlaygroundExtension.kt
A playground-common/playground-plugin/src/main/kotlin/androidx/playground/SettingsParser.kt
ap...@google.com <ap...@google.com> #33
Branch: androidx-main
commit fc3ebc8f51c75d415bbc9258f6bbafa0c8d13bc0
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Dec 20 15:03:26 2022
Extracting SettingsParser to where the main build can use it too
Thanks!
Bug: 146802533
Test: ./gradlew :buildSrc-tests:test
Test: cd playground-common/playground-plugin && ./gradlew test
Test: cd room && ./gradlew tasks
Change-Id: Iffc425e1337f8860f642f240389a44484a215c3b
M buildSrc-tests/src/test/kotlin/androidx/build/SettingsParserTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/SettingsParser.kt
M playground-common/playground-plugin/src/main/kotlin/androidx/playground/PlaygroundExtension.kt
A playground-common/playground-plugin/src/main/kotlin/androidx/playground/SettingsParser.kt
ap...@google.com <ap...@google.com> #34
Branch: androidx-main
commit 78d35946dbcd2f712793d12c2ee2a949f4828dda
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Dec 20 16:19:24 2022
support for a project to identify other projects in its group without configuring those projects
Bug: 146802533
Test: run `./gradlew printCoordinates` before and after this change, save the output from each, sort these output texts, and see that the sorted values don't change
Change-Id: I42c842a6f5a17558d0d75adc51e01f7e6ace9d6f
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
A buildSrc/private/src/main/kotlin/androidx/build/ListProjectsService.kt
ap...@google.com <ap...@google.com> #35
Branch: androidx-main
commit 4cef2b641f237bc8c61a0d5372a9ca32623fe932
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Fri Feb 03 11:56:24 2023
Removing createArchive from buildOnServer
This allows us to modify `./gradlew createArchive` to require within-group constraints to be enabled, lowering the risk of accidentally releasing artifacts built without constraints enabled
Developers will still be able to run `./gradlew buildOnServer` and:
1. It will still include most of the usual checks
2. It should have the same set of within-group constraints as other tasks (no constraints) so remote caching should be high
If a developer really wants to generate within-group constraints, it's still possible to run `busytown/androidx.sh`
Bug: 146802533
Test: ./gradlew buildOnServer -m | grep -i createArchive # and see that no archival tasks run
Change-Id: I681d7bf49f9b3a4f74aba4fb15d3c71c2359eb6f
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXRootImplPlugin.kt
M buildSrc/private/src/main/kotlin/androidx/build/BuildOnServerTask.kt
M buildSrc/private/src/main/kotlin/androidx/build/Release.kt
M busytown/androidx.sh
M busytown/androidx_multiplatform_mac.sh
M busytown/androidx_snapshot.sh
M busytown/impl/build-metalava-and-androidx.sh
ap...@google.com <ap...@google.com> #36
Branch: androidx-main
commit f8dbc80326a7ca410f4553da8f9038ab9e5a583a
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Thu Feb 02 17:30:04 2023
Disallowing publishing for builds that don't enable constraints
to lower the risk of accidentally releasing artifacts built without constraints enabled
Bug: 146802533
Bug: 267776895
Test: rm ../../out/dist -rf && ./gradlew createArchive -Pandroidx.constraints=true && ls ../../out/dist/top-of-tree-m2repository-all-0.zip
Test: rm ../../out/dist -rf && ./gradlew createArchive && cd ../../out/dist && ls top-of-tree-m2repository-all-0.zip per-project-zips/ # and see that this fails
Change-Id: I577cbde46c75f83b68f72a662c79fcb7f38da409
M buildSrc/private/src/main/kotlin/androidx/build/Release.kt
ap...@google.com <ap...@google.com> #37
Branch: androidx-main
commit d8c7059830fa7f94a1862c74c6f9c9528c02fecd
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Thu Feb 02 16:40:51 2023
adding within-group constraints to targets that we might publish from
Bug: 146802533
Test: busytown/androidx.sh
Test: busytown/androidx_snapshot.sh
Change-Id: Ie6e76f09ff67fe7633e2f7c92e04ae1a04b09f1b
M busytown/androidx.sh
M busytown/androidx_multiplatform_mac.sh
M busytown/androidx_snapshot.sh
ap...@google.com <ap...@google.com> #38
Branch: androidx-main
commit bee9898f0479b087bcb3b42e5c1af2e238c38d8e
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Dec 20 18:05:47 2022
Support to add version constraints in same-version groups
Bug: 146802533
// constraints get added when enabled
Test: ./gradlew createArchive -Pandroidx.constraints=true \
&& grep lifecycle-viewmodel-savedstate ../../out/androidx/build/support_repo/androidx/lifecycle/lifecycle-viewmodel-compose/2.6.0-alpha05/lifecycle-viewmodel-compose-2.6.0-alpha05.module -A 4 \
&& grep lifecycle-viewmodel-compose ../../out/androidx/build/support_repo/androidx/lifecycle/lifecycle-viewmodel-savedstate/2.6.0-alpha05/lifecycle-viewmodel-savedstate-2.6.0-alpha05.module -A 4
# and see that a constraint is added
// build still works
Test: Treehugger runs busytown/*.sh
// project subset still works
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew :compose:ui:ui-viewbinding:ui-viewbinding-samples:dataBindingGenBaseClassesRelease
Change-Id: Iee4cd245b71c713dda27cefc530c319097a9d1b4
M buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-main/build.gradle
M buildSrc-tests/project-subsets/src/test/kotlin/androidx/build/ProjectSubsetsTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXGradleProperties.kt
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
M buildSrc/private/src/main/kotlin/androidx/build/ProjectResolver.kt
M libraryversions.toml
ap...@google.com <ap...@google.com> #39
Branch: androidx-main
commit dfa3e488119ee696fa37bd9f57b65dee3026ba9c
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Mon Feb 06 11:47:03 2023
Fix for androidx_with_metalava: createAllArchives -> createArchive
I replaced all instances of "createArchive" with "createAllArchives" but this instance is defined in metalava so it should remain
Bug: 146802533
Test: ./busytown/androidx_with_metalava.sh
Change-Id: I6cd95da0f28befa79aa8c9343a943d98f5311261
M busytown/impl/build-metalava-and-androidx.sh
je...@google.com <je...@google.com> #40
Within the next couple of releases we should start seeing reciprocal constraints being published into
ap...@google.com <ap...@google.com> #41
Branch: androidx-main
commit 1b4aa282f3ac7e9b314c95d2d3a5e6a086157bc6
Author: Jeff Gaston <jeffrygaston@google.com>
Date: Tue Feb 07 13:38:37 2023
More helpful explanation when trying to publish without -Pandroidx.constraints=true
Bug: 146802533
Change-Id: I8ebc3e1d84bd7d8d8b2313d1e830dac9da8ab48c
M buildSrc/private/src/main/kotlin/androidx/build/Release.kt
Description
for example
it declares room-common as [2.2.0] range dependency, which is pointless (according to gradle's dependency team member Cédric Champeau)
It leads to forced resolution, extra network, and blocks the ability to work offline, even if all dependencies already cached locally.
Workaround:
```
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def v = details.requested.version
if (v.startsWith('[') && v.endsWith(']') && !v.contains(',')) {
// fix bad habit of putting a single version in a range, which has no semantics
details.useVersion(v.substring(1, v.length()-1))
}
}
}
```
quick search on our project:
com.google.firebase:firebase-iid:[17.0.0]
com.google.android.gms:play-services-audience:[15.0.1]
com.google.android.gms:play-services-basement:[15.0.1]
com.google.android.gms:play-services-tasks:[15.0.1]
androidx.work:work-runtime:[2.2.0]
com.google.android.gms:play-services-ads-base:[15.0.1]
com.google.android.gms:play-services-ads-lite:[15.0.1]
com.google.android.gms:play-services-gass:[15.0.1]
com.google.android.gms:play-services-analytics-impl:[16.0.1]
com.google.android.gms:play-services-measurement-base:[16.0.0]
com.google.android.gms:play-services-tagmanager-api:[16.0.1]
androidx.room:room-common:[2.2.1]
androidx.room:room-runtime:[2.2.1]
com.google.firebase:firebase-analytics-impl:[16.1.1]
com.google.firebase:firebase-analytics:[16.0.1]
com.google.firebase:firebase-iid:[17.0.0]
androidx.work:work-runtime:[2.2.0]
com.google.android.gms:play-services-ads-base:[15.0.1]
com.google.android.gms:play-services-ads-lite:[15.0.1]
com.google.android.gms:play-services-gass:[15.0.1]
com.google.android.gms:play-services-basement:[15.0.1]
com.google.android.gms:play-services-tasks:[15.0.1]
androidx.room:room-common:[2.2.1]