Closed janzwanenburg closed 3 months ago
honestly I didn't test if incremental works correctly for using this plugin, you will need to have one gradle project per .sln and making them as gradle subprojects, then hopefully the plugin setup the Input source correctly and skip the task execution
but first you should go for simple, that builds a few sln and try
for your current issue, remove
dependencies {
implementation 'com.github.Itiviti.dotnet:com.itiviti.dotnet:1.9.5'
}
and put the following inside the plugins block, as mentioned in the README
id 'com.itiviti.dotnet'
Thanks for the reply. I have a sample with a few sln each with its own gradle.build file. That is working. But now I'd like to take the next step. Hence the question.
But if you are not sure the incremental build works ok, I am very doubtful whether this approach is mature enough for our purpose.
Incremental build in gradle requires Input / Output detected correctly from gradle I used in CI and always rebuild everything, thus I didn't test if the code setting Input / Output is set correctly
You can probably try updating source in one of the projects and see if the tasks are skipped correctly
Hey. I am currently trying to get gradle caching to work so that if you revert something you had already compiled it doesn't recompile again but unfortunately it doesn't seem to work since it always compiles the project. I can confirm that the task is not executed if the sources/destinations haven't changed but I can't get caching between runs to work. Currently in the DotnetBuild task I am just declaring sources and the destinations directory nothing more. Is this supported, and if yes, am I missing something?
Hi @Rockdell
gradle caching does not work with dotnet since the build is actually done by dotnet not gradle but it should support incremental build from msbuild as mentioned in https://learn.microsoft.com/en-us/visualstudio/msbuild/incremental-builds?view=vs-2022
Hello, We have a large industrial C# repo (~5MLoC, 125 .sln files, 600 .csproj files). We would like to speed up the build of this repo significantly, by making it fully incremental. We are investigating whether Gradle would be a good solution for that. We don't have prior knowledge of Gradle, so I may be asking the obvious.
We have a sample repo with a few solutions, each with a separate build.gradle file, containing the dotnet section. What we would like to do is to centralize the dotnet section in a conventions file in the buildSrc directory. Similar to this Gradle user guide.
So we created: buildSrc\build.gradle
and we created a file buildSrc\src\main\groovy\myproject.dotnet-conventions.gradle.
When we try to use this with gradle build, it says:
My assumption is that the prefix 'com.github.Itiviti.dotnet:com' is not correct, as I have just made something up. Now my question: what prefix do I have to use here?
If I am totally off, please let me know too.