Closed lesserwhirls closed 2 years ago
These are great questions!
Whats difference between ucdm-internal-conventions and ucdm-library.. ?
ucdm-internal-conventions
are gradle settings applied to projects that are not intended for external use. ucdm-library-conventions
build upon ucdm-internal-conventions
(so same JVM version target, teesting platform, group and version, for example), but add in publishing and the java-library
plugin.
Whats difference between java plugin, java-library, and application plugin?
java
- basic plugin for java projects. Can compile, have dependencies, make a jar, and not much more.java-library
- interprets a difference between api
and implementation
level dependencies. api
dependencies should be things that appear as part of the public API and exported as transitive dependencies for end users (compile time dependencies in the maven pom). For example, if we return ImmutableList
explicitly from a method, then we'd need to set guava as an api
dependency. Dependencies marked as implementation are not exposed transitivly and show up as runtime in he maven pom. Gradle uses these to determine what is on the classpath at compile vs runtime. This plugin is used for projects that are published for use by our end users.application
- will take the artifacts from a java project and create a distribution for them. It will collect all of the runtime dependencies, the compile project classes, resources, etc., zip them up, and create scripts to execute the main method supplied in the configuration. It's what let's us do ./gradlew :gcdm:run
to start a local gcdm
server.will all the libraries now be published to github?
Anything that has the ucdm-library-conventions
applied to it will get published. I've also discovered that github packages actually kind of sucks, in that to even consume the artifacts (public repo or not), one has to have a github account, create a github personal access token, use those credentials in their build, and (I believe) be added to the repo with explicit read permissions. Not all GitHub package repository types require those hoops, but the maven (and thus gradle) repository types do. Bummer.
it looks like github review page is flagging "no newline at end of file" in many of the gradle files
That should just be a visual marker to indicate there is no new line. I can certainly add one without any issues though.
Looking back at my PR, I think dependencies marked as api
with the ucdm-internal-conventions
should really be changed to implementation
...not sure why it allows that, as the api
configuration comes from the java-library
plugin. My guess is that it is treating api
as implementation
in that case.
to even consume the artifacts (public repo or not), one has to have a github account, create a github personal access token, use those credentials in their build, and (I believe) be added to the repo with explicit read permissions.
I was suspecting that, based on what I had to do to consume artifacts. For now, lets go ahead with it, and see if/when it becomes a problem.
Added just a few minor cleanup items, but nothing major.
Part 1 of the gradle build reorganization.