Skip to content

Create publishChangedToBuildDir task. #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

allisonbm92
Copy link
Contributor

This change adds this new task. It leverages the implementation used for
the checkChanged and similar tasks.

This change adds this new task. It leverages the implementation used for
the `checkChanged` and similar tasks.
@googlebot googlebot added the cla: yes Override cla label Jun 5, 2019
def task = dep.getDependencyProject()
.tasks.findByName("publishMavenAarPublicationToBuildDirRepository")
if (task != null) {
publishChangedToBuildDir.dependsOn task
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to make publishChangedToBuildDir directly depend on sub's dependencies' publishMavenAarPublicationToBuildDirRepository? Shouldn't sub's publishMavenAarPublicationToBuildDirRepository already depend on it's dependencies' publishMavenAarPublicationToBuildDirRepository?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not how those tasks are configured. They don't publish their dependencies.

@@ -155,6 +178,13 @@ class PublishingPlugin implements Plugin<Project> {
}
}

private static Set<String> changedPaths(File workDir) {
return 'git diff --name-only --submodule=diff HEAD@{0} HEAD@{1}'
Copy link
Contributor

@yifanyang yifanyang Jun 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to see if git can be run programmatically. But it is probably fine if you think this task will be invoked only on machines that has git available. Also, what is the intended diff range here? I think HEAD@{1} can be any commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It diffs head and head - 1. I copied this from the checkChanged tasks. I think this is primarily intended for Prow, as it might give misleading results locally.

// Add changed projects to publishChangedToBuildDir.
if (changedProjects.contains(sub)) {
publishChangedToBuildDir.dependsOn "$sub.path:publishMavenAarPublicationToBuildDirRepository"
def dependencies = sub.configurations.implementation.dependencies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/implementation/releaseRuntimeClasspath/

if (changedProjects.contains(sub)) {
publishChangedToBuildDir.dependsOn "$sub.path:publishMavenAarPublicationToBuildDirRepository"
def dependencies = sub.configurations.implementation.dependencies
for (def dep : dependencies) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the intent here? Why do we need to publish dependencies of the project? Also, if it is needed indeed, don't we also want to publish dependencies of dependencies recursively?

@@ -155,6 +178,13 @@ class PublishingPlugin implements Plugin<Project> {
}
}

private static Set<String> changedPaths(File workDir) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaicr, we have the same git command elsewhere, can we centralize this in one place to avoid duplication?

allisonbm92 added a commit that referenced this pull request Jun 12, 2019
allisonbm92 added a commit that referenced this pull request Jun 12, 2019
allisonbm92 added a commit that referenced this pull request Jun 12, 2019
@allisonbm92 allisonbm92 deleted the allison-publish-changed branch June 12, 2019 17:53
allisonbm92 added a commit that referenced this pull request Jun 12, 2019
allisonbm92 added a commit that referenced this pull request Jun 12, 2019
allisonbm92 added a commit that referenced this pull request Jun 12, 2019
allisonbm92 added a commit that referenced this pull request Jun 12, 2019
allisonbm92 added a commit that referenced this pull request Jun 13, 2019
diwu-arete added a commit that referenced this pull request Jun 18, 2019
…sts for it. (#524)

* Add type arguments in StorageTaskManager (#517)

* Output artifact list during local publishing. (#515)

This effort replaces #494.

* Implement Firebase segmentation SDK device local cache

* fix functions (#523)

* fix functions

* update minsdk version

* remove idea

* Set test type to release only in CI. (#522)

* Set test type to release only in CI.

This fixes Android Studio issue, where it is impossible to run
integration tests in debug mode.

Additionally move build type configuration to FirebaseLibraryPlugin to
avoid projects.all configuration in gradle.

* Add comment back.

* [Firebase Segmentation] Add custom installation id cache layer and tests for it.

* Add test for updating cache

* Switch to use SQLiteOpenHelper

* Minor fix to error message to match the admin sdk. (#525)

* Minor fix to error message to match the admin sdk.

In particular, it *is* allowed to have slashes, etc in field paths.

* Added clean task to smoke tests. (#527)

This change allows the smoke tests to clean all build variants created
by the infrastructure.

* Update deps to post-androidx gms versions. (#526)

* Update deps to post-androidx gms versions.

Additionally configure sources.jar for SDKs.

* Update functions-ktx deps

* Fix versions.

* unbump fiam version in fiamui-app

* Switch to use SharedPreferences from SQLite.

* Change the cache class to be singleton

* Copy firebase-firestore-ktx dependencies on firestore into its own subfolder (#528)

* Wrap shared pref commit in a async task.

* Address comments

* Bump firestore version for release (#530)

Additionally fix pom filter to exclude multidex from deps.

* Google format fix
@firebase firebase locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants