-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[WIP] Cleanup build script #4163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| repositories { | ||
| mavenCentral() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this now duplicated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specifies the repositories used for resolving dependencies for the buildSrc project.
As far as I know, this does not overwrite or duplicate the buildscript.repositories property in the build.gradle.
|
I like the idea. How does that work with the multi module building? |
|
@Siedlerchr The The main advantage of this is that the versions of dependencies don't need to be managed in every module, but you can just change the version in one central file and all modules will use that version. |
stefan-kolb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugin idea looks good to me.
I'm not sure about the dependency extraction yet.
Will we have a lot of shared dependencies?
If we have modules for gui, logic, model, most libraries will not be shared between the projects except for test libraries?
build.gradle
Outdated
| compile libraries.dndtabpane | ||
| compile libraries.javaInject | ||
|
|
||
| // Cannot be updated to 9.*.* until Jabref works with Java 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move comment to library file?
build.gradle
Outdated
| compile libraries.loggingApi | ||
| compile libraries.logging | ||
|
|
||
| // need to use snapshots as the stable version is from 2013 and doesn't support v1.0.1 CitationStyles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment to library file
| } | ||
|
|
||
| dependencies { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this if it's empty?
|
@stefan-kolb I agree that the dependency extraction is not optimal. I think something like mavens As far as I can tell, shared dependencies are mainly testing, logging, guava, and antlr. |
|
The question is, if we should just include the plugin idea for now and duplicate the dependencies. |
|
Sure, we can do that. Just for completeness sake: I've read about two other possibilities to manage dependency versions in multi-module gradle builds. |
|
Using a properties file looks promising to me. |
|
The extraction of plugins is definitely a good idea. |
|
@tobiasdiez Yes, I think now with the versions inlined it is a bit less confusing. |
|
We discussed this in the dev call, and the decision was to include the changes of the plugins (done in #4934) and to wait with the extraction of the dependencies until we have a bit more experience with the modular build. Thanks for your PR. |
This prepares for splitting JabRef into several modules.
The dependencies were extracted to a separate file. This makes it much easier in the future to define shared dependencies across multiple modules, without duplicating them in the build scripts and especially keeping them all updated to the same version.
According to Gradle's guide on writing maintainable build scripts, build scripts should not contain any imperative logic but just declarative language elements. Imperative logic should live as plugins in the
buildSrcdirectory. So I extracted the ANTLR tasks to this directory. This also makes it much easier to move the tasks to another module in the future.What do you think? I would like to extract the XJC-, release-, and localization-tasks to separate plugins if you approve these changes.