Slackbot
01/06/2023, 5:47 PMChris Lee
01/06/2023, 5:58 PMA:
drive in use, hopefully that’s not a floppy disk…Jiří Grygerek
01/06/2023, 5:59 PMJiří Grygerek
01/06/2023, 6:00 PMtask cleanOld() {
[
'A:/workspaces/latest/plugins/',
'A:/plugins/'
]
.each {destination -> {
def tree = fileTree(destination)
tree.include('**/skJson*.jar')
tree.each {it.delete()}
}}
}
Chris Lee
01/06/2023, 6:02 PMjar
task that will create the correct dependencies;
• try/catch is not necessary; all you are doing here is configuration (not execution)
• It isn’t clear what the type of the task is - should either be a Copy
task, or use copy { }
within a doFirst of a generic task.Jiří Grygerek
01/06/2023, 6:03 PMJiří Grygerek
01/06/2023, 6:05 PMtask release(type: Copy) {
dependsOn(shadowJar)
[
'A:\\workspaces\\plugins'
]
.each {destination -> copy
{
from shadowJar
into destination
}
}
}
Chris Lee
01/06/2023, 6:05 PMtask release {
dependsOn(shadowJar, build)
doFirst {
[
'A:/workspaces/plugins'
]
.each {destination -> copy {
from jar
into destination
}
}
}
Chris Lee
01/06/2023, 6:06 PMtask release : Copy {
from jar
[
'A:/workspaces/plugins'
]
.each {destination ->
into destination
}
}
Jiří Grygerek
01/06/2023, 6:07 PMChris Lee
01/06/2023, 6:08 PMJiří Grygerek
01/06/2023, 6:09 PMtask release(type: Copy)
but it still doesn't do anythingChris Lee
01/06/2023, 6:09 PMJiří Grygerek
01/06/2023, 6:09 PMChris Lee
01/06/2023, 6:10 PM./gradlew release --info
Jiří Grygerek
01/06/2023, 6:11 PMInitialized native services in: C:\Users\nexti\.gradle\native
Initialized jansi services in: C:\Users\nexti\.gradle\native
Found daemon DaemonInfo{pid=18824, address=[b3f1db57-a706-479b-b7fe-f6491d7bfd91 port:60787, addresses:[/127.0.0.1]], state=Idle, lastBusy=1673028515702, context=DefaultDaemonContext[uid=d20d0bdb-c9fb-417b-8c3c-5fed73343ad9,javaHome=C:\Program Files\Java\jdk-17.0.5,
daemonRegistryDir=C:\Users\nexti\.gradle\daemon,pid=18824,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base
/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=windows-1250,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Eclipse Adoptium\jdk-17.0.4.101-hotspot,daemonRegistryDir=C:\Users\nexti\.gradle\daemon,pid=10800,idleTimeout=null,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java
.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=AL
L-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=windows-1250,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=d20d0bdb-c9fb-417b-8c3c-5fed73343ad9,javaHome=C:\Program Files\Java\jdk-17.0.5,daemonRegistryDir=C:\Users\nexti\.gradle\daemon,pid=18824,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--ad
d-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.ni
o.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=windows-1250,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 14992). The daemon log file: C:\Users\nexti\.gradle\daemon\7.3.3\daemon-14992.out.log
Starting 9th build in daemon [uptime: 41 mins 54.348 secs, performance: 100%, non-heap usage: 22% of 256 MiB]
Using 12 worker leases.
Now considering [A:\Projects\skJson] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file 'A:\Projects\skJson\settings.gradle'.
Projects loaded. Root project using build file 'A:\Projects\skJson\build.gradle'.
Included projects: [root project 'skJson']
> Configure project :
Evaluating root project 'skJson' using build file 'A:\Projects\skJson\build.gradle'.
All projects evaluated.
Selected primary task 'release' from project :
Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':release']
Tasks that were excluded: []
:compileJava (Thread[Execution worker for ':',5,main]) started.
> Task :compileJava UP-TO-DATE
Caching disabled for task ':compileJava' because:
Build cache is disabled
Skipping task ':compileJava' as it is up-to-date.
:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.024 secs.
:processResources (Thread[Execution worker for ':',5,main]) started.
> Task :processResources UP-TO-DATE
Caching disabled for task ':processResources' because:
:release (Thread[Execution worker for ':',5,main]) started.
> Task :release UP-TO-DATE
Caching disabled for task ':release' because:
Build cache is disabled
Skipping task ':release' as it is up-to-date.
:release (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
Chris Lee
01/06/2023, 6:11 PMJiří Grygerek
01/06/2023, 6:12 PMChris Lee
01/06/2023, 6:14 PMChris Lee
01/06/2023, 6:16 PMjar
task is creating something (perhaps it’s disabled).Jiří Grygerek
01/06/2023, 6:16 PMtask release(type:Copy) {
dependsOn build, shadowJar
from jar, shadowJar
[
'A:/plugins/',
'A:\\workspaces\\plugins'
]
.each {destination ->
into destination
}
}
Works ^^Chris Lee
01/06/2023, 6:17 PMJiří Grygerek
01/06/2023, 6:17 PMJiří Grygerek
01/06/2023, 6:17 PMChris Lee
01/06/2023, 6:17 PMfrom
with a task provides an implicit dependency. Should rarely, if ever, need dependsOn.Jiří Grygerek
01/06/2023, 6:17 PMJiří Grygerek
01/06/2023, 6:17 PMJiří Grygerek
01/06/2023, 6:24 PMChris Lee
01/06/2023, 6:25 PMJiří Grygerek
01/06/2023, 6:25 PM