-
Notifications
You must be signed in to change notification settings - Fork 624
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
Conversation
This change adds this new task. It leverages the implementation used for the `checkChanged` and similar tasks.
def task = dep.getDependencyProject() | ||
.tasks.findByName("publishMavenAarPublicationToBuildDirRepository") | ||
if (task != null) { | ||
publishChangedToBuildDir.dependsOn task |
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 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
?
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.
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}' |
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.
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.
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.
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 |
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.
nit: s/implementation/releaseRuntimeClasspath/
if (changedProjects.contains(sub)) { | ||
publishChangedToBuildDir.dependsOn "$sub.path:publishMavenAarPublicationToBuildDirRepository" | ||
def dependencies = sub.configurations.implementation.dependencies | ||
for (def dep : dependencies) { |
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.
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) { |
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.
afaicr, we have the same git command elsewhere, can we centralize this in one place to avoid duplication?
This effort replaces #494.
This effort replaces #494.
This effort replaces #494.
This effort replaces #494.
This effort replaces #494.
This effort replaces #494.
This effort replaces #494.
This effort replaces #494.
…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
This change adds this new task. It leverages the implementation used for
the
checkChanged
and similar tasks.