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 84b22a0 to 92a9f34 Compare January 11, 2025 08:19
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