rjhdby
12/04/2018, 2:10 PMTorbilicious
12/04/2018, 3:13 PMtasks.create<Copy>("copyStuff") {
from("/some/source")
into("/some/destination")
}
Is that what you are looking for?tasks {
register("copyStuff", Copy::class) {
from("/some/source")
into("/some/destination")
}
}
gildor
12/04/2018, 4:03 PMrjhdby
12/05/2018, 8:19 AMtasks{
create<Copy>("copyStuff") {
from(".")
into("out/production")
include("properties/monportalCache.properties")
}
register("copyStuff", Copy::class) {
from(".")
into("out/production")
include("properties/monportalCache.properties")
}
copy {
from(".")
into("out/production")
include("properties/monportalCache.properties")
}
}
First and second does not work. Third is only working variant.
Where I'm wrong?gildor
12/05/2018, 8:26 AMtasks
block), this is project’s method, part of project evaluation lifecycle
https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:copy(org.gradle.api.Action)rjhdby
12/05/2018, 8:43 AMcopy
method then inside into
directory I see properties/blabla
, if I use register
or create
- I don't see anythinggildor
12/05/2018, 8:44 AMcopyStuff
?copyStuff
task I see outputcreate
and register
task builders, both support register("copyStuff", Copy::class)
and register<Copy>("copyStuff")
syntax, just second one is more idiomatic and Kotlin friendly IMO, difference only about eager/lazy task creation
https://docs.gradle.org/current/userguide/task_configuration_avoidance.htmlrjhdby
12/05/2018, 10:56 AM