Hello,
I’m trying to structure my project as a multi application project. I’d like to mention that I’m really new to gradle and still have some problems grasping some of the concepts. So please correct me if I’m wrong.
I’ve used gradle init
to create the project structure according the getting started guide Creating Multi-project Builds
If I understand it correctly the folder buildSrc
is basically an own Gradle project (because it has a build.gradle(.kts) file). The build.gradle file has kotlin-dsl
plugin loaded and defines the gradlePluginPortal()
repository. The init process also created the folder src/main/kotlin
where conventions are defined. The way I understand this is that I basically could create Kotlin code in this folder to create plugins and they’ll be loaded automatically in the main build.
But what I’d like to do is instead of using Kotlin to define those Plugins with Java. Which as far as i know is possible. I’ve already found some examples in the Gradle Docs like Authoring Tasks (gradle.org).
So I’ve copy pasted the example to the exact path. And tried to run it but I’m getting the error that the task is not found.
I don’t know what to look for and where to read about that. I’m already reading the entire documentation but somehow I’m missing something.
I’ll appreciate your feedback and comments.
Thanks!