Skip to content

Gradle include is broken #125

@gipo355

Description

@gipo355

Gradle include scripts generates phantom projects

> Task :projects

------------------------------------------------------------
Root project 'root'
------------------------------------------------------------

Root project 'root'
+--- Project ':@gipo355'
|    +--- Project ':@gipo355:jakarta-base-rest'
|    \--- Project ':@gipo355:smispi'
\--- Project ':libs'
     +--- Project ':libs:jakarta-base-rest'
     \--- Project ':libs:smispi'

To see a list of the tasks of a project, run gradlew <project-path>:tasks
For example, try running gradlew :@gipo355:tasks

as can be seen, phantom project @gipo355 is created with copies of smispie and jakarta-base-rest

this duplicates the tasks and takes much longer.

relevant code:

fileTree('.').visit { FileVisitDetails details ->
if (details.file.isDirectory()) {
// TODO: check if not symbolic links
// isRegularFIle
// check if project.json is present
if (file("$details.file/build.gradle").exists()) {
// this will produce :appname, i want :dir:appname
include ":${details.file.parentFile.name}:${details.file.name}"
project(":${details.file.parentFile.name}:${details.file.name}").projectDir = details.file

Desired result:

  • project root
  • project libs:jakarta-base-rest
  • project libs:smispi

for now i'll manually include subproject

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions