plantuml / plantuml

Generate diagrams from textual description
https://plantuml.com
Other
9.73k stars 881 forks source link

Add Gradle as a build system! #47

Closed aadrian closed 2 years ago

aadrian commented 7 years ago

Add Gradle as a build system since it's much easier to manage multi-module projects.

Thank you.

arnaudroques commented 7 years ago

Good idea! However, we know very few about Gradle... So we are open to contribution to create our build.gradle file. Could you help us on this ? Thanks!

aadrian commented 7 years ago

@arnaudroques of course. I'll propose a module structure (e.g. at least the GPL Ditaa code as a separate module), and submit PRs.

aadrian commented 7 years ago

@arnaudroques https://github.com/plantuml/plantuml/wiki/Module-Proposal

thetric commented 7 years ago

@aadrian Some external libraries can be linked as a dependency if a GitHub repo exists so the project size decreases. The website https://jitpack.io/ enables developers to use any GitHub repo as a dependency as it builds and provides the projects on demand.

Example: https://github.com/stathissideris/ditaa provides the org/stathissideris/ascii2image package. The Gradle config:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    // latest commit is 66ea
    compile 'com.github.stathissideris:ditaa:66ea2102b5'
}
aadrian commented 7 years ago

@thetric thank you for the details.

The main problem that I see right now is that GitHub is not the main repo for this project and it doesn't seems like it's used to pull requests from it (see long standing PRs).

thetric commented 7 years ago

@arnaudroques ping?

@aadrian I would also suggest to move the Swing UI to a separate module

aadrian commented 7 years ago

I would also suggest to move the Swing UI to a separate module

@thetric good point! I updated the proposal to include an UI module too: https://github.com/plantuml/plantuml/wiki/Module-Proposal

The main issue right now seems to be that Git (and GitHub is not used) as a primary VCS so PRs do not seem to be integrated but (copied).

thetric commented 6 years ago

@aadrian Would you still like to migrate the build system? I'd like to help :) I've already added some missing library links in your module proposal. Some GitHub PRs are accepted by @arnaudroques, so we have good chances to be merged too

aadrian commented 6 years ago

@thetric I don't think that the author wants to migrate the project. He is not using the PR feature: https://github.com/plantuml/plantuml/pulls

GitHub and GIT seem to be just a "backup".

soloturn commented 2 years ago

@aadrian lets make easy to digest, and small pull requests.

soloturn commented 2 years ago

@aadrian @thetric , @arnaudroques merged the gradle build system now, also an example github workflow to release. this can be closed now isn't it?

matthew16550 commented 2 years ago

@arnaudroques what is the future thinking for Gradle / Maven / Ant?

arnaudroques commented 2 years ago

@arnaudroques what is the future thinking for Gradle / Maven / Ant?

Well, I don't see any need for change here: the build of PlantUML is quite simple, so I don't think we really need to change tools here. However, I may be wrong, so if anyone disagree, please post here :-)

matthew16550 commented 2 years ago

@arnaudroques I agree the build is simple. But supporting all 3 build systems will make it complicated because we need to keep them in sync. e.g. just now, Ant still targets Java 1.7.

Not sure where the Ant build is used?

Anyone importing the project in IntelliJ will need to choose importing from the Maven model or the Gradle model. Today I don't know which to recommend. Guess other IDEs would be similar.

And anyone editing the builds would ideally understand all 3 so a change can be done a single PR. Otherwise work is being made for someone else to put them back in sync.

I think we should head towards dropping Maven and using Gradle instead because Gradle is generally simpler - of course that's just a subjective opinion, I've used both and on balance have found Gradle projects less confusing.

For me, Maven was very difficult to learn. Perhaps it is a higher barrier to people contributing than Gradle would be.

Gradle can make Maven artefacts so we would still be able to publish to Maven Central etc.

That said, I do not have much time to help just now so all I am suggesting is work for someone else to actually do 😁

arnaudroques commented 2 years ago

I think we should head towards dropping Maven and using Gradle instead because Gradle is generally simpler

Ok, so let's keep all simple, drop Maven and switch to Gradle! @soloturn So you're clear to go :-)

soloturn commented 2 years ago

for the gradle case, i found the advise one could get on gradle discuss quite attracting, tbh. like the one given by @vampire for the testing with java8: https://discuss.gradle.org/t/build-with-java11-run-and-test-with-java8/42178

so lets try to switch the default from maven to gradle by commenting within the github workflows. in case we overlooked something, just revert, @arnaudroques .