Skip to content

Move access to rootDir into plugin apply method #210

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

Merged
merged 1 commit into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Java Module Dependencies Gradle Plugin - Changelog

## Version 1.9.3
* [#209](https://github.com/gradlex-org/java-module-dependencies/issues/209) Fix: configuration cache issue when building kotlin-dsl plugins

## Version 1.9.2
* Update module name mappings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ public abstract class JavaModuleDependenciesExtension {
*/
public abstract Property<Boolean> getAnalyseOnly();

public JavaModuleDependenciesExtension(VersionCatalogsExtension versionCatalogs) {
public JavaModuleDependenciesExtension(VersionCatalogsExtension versionCatalogs, File rootDir) {
this.versionCatalogs = versionCatalogs;
getModuleInfoCache().convention(getProviders().provider(() -> getObjects().newInstance(ModuleInfoCache.class, false)));
getModulesProperties().set(new File(getProject().getRootDir(), "gradle/modules.properties"));
getModulesProperties().set(new File(rootDir, "gradle/modules.properties"));
getVersionCatalogName().convention("libs");
getModuleNameCheck().convention(true);
getAnalyseOnly().convention(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void apply(ExtensionAware projectOrSettings) {
private void applyProject(Project project) {
VersionCatalogsExtension versionCatalogs = project.getExtensions().findByType(VersionCatalogsExtension.class);
JavaModuleDependenciesExtension javaModuleDependencies = project.getExtensions().create(
JAVA_MODULE_DEPENDENCIES, JavaModuleDependenciesExtension.class, versionCatalogs);
JAVA_MODULE_DEPENDENCIES, JavaModuleDependenciesExtension.class, versionCatalogs, project.getRootDir());

setupExtraJavaModulePluginBridge(project, javaModuleDependencies);

Expand Down