0

I recently splitted our micornaut project in seperate module, but since then the continous build doe s not work anymore for the subprojects. But changes in the root project will still be detected.

The build.grade of the root project looks like this:

plugins {
    id 'java'
    id "com.github.johnrengelman.shadow" version "7.0.0"
    id "io.micronaut.application" version "3.6.5"
}

version = "0.1"
group = "com.example"

repositories {
    mavenCentral()
}

configurations {
    compile
}

micronaut {
    runtime("netty")
    testRuntime("junit5")
    processing {
        incremental(true)
        annotations("*")
    }
}

dependencies {
    implementation project(':child1')
    implementation project(':child2')
}

And a child build.gradle like this:

plugins {
    id 'java'
    id 'io.micronaut.library'
}

group 'com.example'
version '0.1'

repositories {
    mavenCentral()
}

dependencies {
   implementation project(":child1")
}

The gradle.properties like this:

org.gradle.jvmargs='-Dfile.encoding=UTF-8'
org.gradle.caching=true
org.gradle.vfs.verbose=true
org.gradle.vfs.watch=true
micronautVersion=3.7.4
version=7.4.0

I start the application with *gradle run -t. In settings.gradle are all subprojects included. Any ideas how to fix this?

EDIT: Output of gradle run --dry-run :

VFS> Statistics since last build:                  
VFS> > Stat: Executed stat() x 0. getUnixMode() x 0
VFS> > FileHasher: Hashed 0 files (0 bytes)        
VFS> > DirectorySnapshotter: Snapshot 0 directory hierarchies (visited 0 directories, 0 files and 0 failed files)
Received 4102 file system events since last build while watching 1 locations
Virtual file system retained information about 545 files, 113 directories and 0 missing files since last build
:child1:compileJava SKIPPED
:child2:compileJava SKIPPED
:child3:compileJava SKIPPED
:compileJava SKIPPED
:processResources SKIPPED
:classes SKIPPED
:child1:processResources SKIPPED
:child1:classes SKIPPED
:child1:jar SKIPPED
:child2:processResources SKIPPED
:child2:classes SKIPPED
:child2:jar SKIPPED
:child3:processResources SKIPPED
:child3:classes SKIPPED
:child3:jar SKIPPED
:run SKIPPED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 2s
Received 16 file system events during the current build while watching 1 locations
Virtual file system retains information about 564 files, 117 directories and 0 missing files until next build
VFS> Statistics during current build:
VFS> > Stat: Executed stat() x 4. getUnixMode() x 0
VFS> > FileHasher: Hashed 15 files (40.351 bytes)
VFS> > DirectorySnapshotter: Snapshot 4 directory hierarchies (visited 4 directories, 19 files and 0 failed files)
Zonko
  • 119
  • 7
  • A good way to debug why tasks may not be running as you expect them to, is to look at `gradle --dry-run`. This will show you what the order is of the tasks that gradle will execute. So for you it would be: `gradle run --dry-run`. Do you have an idea where the `run` task comes from? Did you make it yourself or is it imported from some plugin? – Koedlt Nov 29 '22 at 15:35
  • @Koedlt The run task is a default Gradle task. – Zonko Nov 30 '22 at 08:26
  • Interesting, the project I'm working on has no `run` gradle task, so I would not guess it to be a default gradle task. Which version of gradle are you on? And what is the output of `gradle run --dry-run`? – Koedlt Nov 30 '22 at 20:17
  • @Koedlt Im using 7.4.2 Dry run shows me that gradle skips all subproject while executing the task. Die command output starts with `Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details ` – Zonko Dec 01 '22 at 08:31
  • @Koedlt did that say anything to you? – Zonko Dec 05 '22 at 09:59
  • Can you add the full output of `gradle run --dry-run` to the question? That first line is not enough info to work with. – Koedlt Dec 05 '22 at 10:19
  • @Koedlt sorry for no response for long time. I did now. – Zonko Dec 12 '22 at 11:49

0 Answers0