Closed MarcDahlem closed 7 years ago
The msbuild
gradle is simply a default task created of type MSBuild
, as you can see here but you can create others:
project.task('msbuild2', type: MSBuild) {
configuration = 'Release'
}
Gradle is not ant or make, you have a configuration phase before the execution, and in the later, altering configuration is no longer supported.
Ah nice, I didn't check your code. Thanks a lot.
This solution works (mostly): Only the clear command does not clear the solutions output directories, then.
For the benefit of anybody going down the same rabbit hole I went down, you have to add import com.ullink.Msbuild
before this will work.
Full solution:
import com.ullink.Msbuild
task compileFoo(type: Msbuild) {
projectFile = "foo.vcxproj"
targets = ["Build"]
// other properties
}
At the moment it seems, that one must add a single configuration to the msbuild configuration block.
What I need is a task, which builds my visual studio solution with both configurations 'Release' and 'Debug', so that I can upload both artifacts to maven with one gradle call.
Therefore, I ask for a possibility to define multiple configurations in the msbuild configuration. e.g.:
I already tried to call msbuild mutliple times, but the latter did unforunately not work, as the task 'msbuild' is only executed once (in the example,
gradle clean build
builds only the msbuild with configuration Release):