Skip to content
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

Support Isolated Projects #1139

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Support Isolated Projects #1139

wants to merge 2 commits into from

Conversation

Goooler
Copy link
Member

@Goooler Goooler commented Jan 10, 2025

Refs #907.

https://docs.gradle.org/8.12/userguide/isolated_projects.html#how_do_i_use_it


  • CHANGELOG's "Unreleased" section has been updated, if applicable.

@Goooler Goooler force-pushed the g/20241225/migrate-func-tests branch 2 times, most recently from fa38161 to 17d7df6 Compare January 10, 2025 05:03
Base automatically changed from g/20241225/migrate-func-tests to main January 10, 2025 09:11
@Goooler Goooler changed the title Enable Isolated Projects flags in functional tests Support Isolated Projects Jan 10, 2025
@Goooler Goooler force-pushed the g/20250110/isolated-projects branch from 4fcc4c3 to 2998d4d Compare January 10, 2025 09:20
@Goooler
Copy link
Member Author

Goooler commented Jan 10, 2025

https://scans.gradle.com/s/yz3nrgegbl3vc/tests/overview?outcome=FAILED


  • Unknown location: Project ':server' cannot access 'Project.group' functionality on another project ':client'
  • Unknown location: Project ':server' cannot access 'Project.version' functionality on another project ':client'

(dependency.group == null || resolvedDependency.moduleGroup.matches(dependency.group!!.toRegex())) &&
resolvedDependency.moduleName.matches(dependency.name.toRegex()) &&
(dependency.version == null || resolvedDependency.moduleVersion.matches(dependency.version!!.toRegex()))


  • Unknown location: Project ':impl' cannot access 'Project.configurations' functionality on another project ':api'
  • Unknown location: Project ':impl' cannot access 'Project.files' functionality on another project ':api'

fun getApiJarsFromProject(project: Project): FileCollection {
val apiDependencies = project.configurations.findByName("api")?.dependencies
?: return project.files()
val runtimeConfiguration = project.runtimeConfiguration
val apiJars = mutableListOf<File>()
apiDependencies.forEach { dep ->
when (dep) {
is ProjectDependency -> {
apiJars.addAll(getApiJarsFromProject(dep.dependencyProjectCompat(project)))
addJar(runtimeConfiguration, dep, apiJars)
}

@Goooler Goooler force-pushed the g/20250110/isolated-projects branch from 9348a7b to af858ec Compare February 27, 2025 06:41
@Goooler
Copy link
Member Author

Goooler commented Mar 1, 2025

/gemini review

Copy link
Contributor

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@Goooler
Copy link
Member Author

Goooler commented Mar 1, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces support for isolated projects in the Gradle Shadow plugin. This is achieved by adding a system property to the Gradle command-line arguments in the functional tests and updating the multi-project test case. The changes seem reasonable and well-targeted.

Merge Readiness

The changes look good and the pull request seems ready to be merged. I am unable to directly approve the pull request, and recommend that others review and approve this code before merging.

@Goooler Goooler requested a review from Copilot March 1, 2025 09:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant