Slackbot
10/12/2023, 9:37 AMThomas Broyer
10/12/2023, 10:55 AMbuild.
I do such generations with jOOQ and put them to src/main/jooq and commit them to Git.
(to make things clear: code is generated by executing a specific task, and that task is not run during a standard build; the reason is that it connects to a database that needs to have been initialized with the appropriate schema, definitely not something you want to do at each ./gradlew build)Giuseppe Barbieri
10/12/2023, 10:56 AMbuild thoughVampire
10/12/2023, 12:19 PMCONTRIBUTING.md or similar what you need to do as ramp up.
If it is about IDE users and you expect them to use IntelliJ, you can for example use the idea-ext plugin to configure your code generation task as automatically run after sync, so it should work out-of-the-box.Giuseppe Barbieri
10/12/2023, 12:46 PMThomas Broyer
10/12/2023, 12:53 PMGiuseppe Barbieri
10/12/2023, 12:55 PMThomas Broyer
10/12/2023, 1:02 PMGiuseppe Barbieri
10/12/2023, 1:03 PMGiuseppe Barbieri
10/12/2023, 4:07 PMGiuseppe Barbieri
10/12/2023, 4:07 PMmain one?Giuseppe Barbieri
10/12/2023, 4:13 PMsourceSets.register("generatedMain") {
compileClasspath += sourceSets.main.get().compileClasspath
}
but I'm breaking laziness by calling get()?Vampire
10/12/2023, 4:19 PMGiuseppe Barbieri
10/12/2023, 4:41 PMsrc/main/kotlin-java foldersGiuseppe Barbieri
10/12/2023, 4:42 PMGiuseppe Barbieri
10/12/2023, 4:42 PMsrc/generatedMainKotlin-generatedMainJava ..