How to organize build.gradle files and class structure in gradle project?

I want to make a plugin for teamcity and jenkins, but i'm not sure how I should be structuring my project to best fit that. I've seen examples where there are multiple build.gradle files at various levels of the project, but some plugin/dependency definitions seem redundant between them as opposed to being in a more top-level build.gradle (if that makes sense). I'm not familiar with gradle or java at all. Any pointers would be incredibly helpful! I also don't know how classes should be structured in a gradle project. I know there may be differing methodologies here, but I'm thinking the project structure might look like this:
settings.gradle
build.gradle
gradlew
app
- /src
- /main/java/com
- /subproject1_name
- build.gradle
- subproject1.java
- /subproject2_name
- build.gradle
- subproject2.java
- test/java/com
- /subproject1_name
- subproject1.java
- /subproject2_name
- subproject2.java

settings.gradle
build.gradle
gradlew
app
- /src
- /main/java/com
- /subproject1_name
- build.gradle
- subproject1.java
- /subproject2_name
- build.gradle
- subproject2.java
- test/java/com
- /subproject1_name
- subproject1.java
- /subproject2_name
- subproject2.java

Or something like that. Subproject1 might be the actual server-side integration layer of the plugin, whereas subproject2 might be a webserver that is run separately outside of jenkins. Should those be in separate repositories? Again any advice, resources or suggestions would be greatly appreciated!
1 Reply
JavaBot
JavaBot4w ago
This post has been reserved for your question.
Hey @DaMango! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here. 💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server