Skip to content
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

Updating build to gradle 6.1 and adding publishing options. #61

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lbergelson
Copy link

  • Updating gradle from 4.9 -> 6.1
  • Updating from using java plugin -> java-library plugin
  • Adding publishing section to build to allow publishing to local and remote repositories

I've added a publishing section that publishes to the same places that most broad projects are published. This is more a proof of concept than a working option since you might have different publishing targets. I've tested publishing to the broad artifactory with my credentials and that works, as does publishing to maven local. I haven't / can't publish to sonatype because I don't control the org.magicdgs namespace.

I edited the version a bit to drop the .dirty and add SNAPSHOT when relevant. Happy to make whatever changes you prefer though. The snapshot bit is necessary I think for dealing with maven snapshot repositories but removing dirty is not important.

I need to add publishing options so I can make it easy to test against gatk.

* Updating gradle from 4.9 -> 6.1
* Updating from using java plugin -> java-library plugin
* Adding publishing section to build to allow publishing to local and remote repositories
@lbergelson
Copy link
Author

Tests are failing because travis no longer offers oraclejdk8 on the newer vms. I think we can fix this by pegging ourselves to an old version of ubuntu, but the best/easiest thing is probably to just switch to testing on openjdk8. The newest versions of oracle jdk 8 require a restrictive license and the old versions are only available with an oracle login, so it's pretty annoying.

* Fixes failing travis tests by switching to openjdk8.
  OracleJdk 8 seems to be unavailable on the newer travis vms.
@codecov-io
Copy link

codecov-io commented Jan 23, 2020

Codecov Report

Merging #61 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #61   +/-   ##
=========================================
  Coverage     84.36%   84.36%           
  Complexity      126      126           
=========================================
  Files             8        8           
  Lines           339      339           
  Branches         60       60           
=========================================
  Hits            286      286           
  Misses           42       42           
  Partials         11       11

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e20eec...359ed30. Read the comment docs.

@magicDGS
Copy link
Owner

@lbergelson, thanks for starting with the contribution/collaboration!

First, could you please separate (in two PRs) the publishing from the gradle update? I have to think about publishing strategy/coordinates in maven and thus we can leave that for a different PR to discuss there.

In addition, I'd like to keep the dirty marker when a build is done with changes in the local repository (should not happen on the CI build) to be sure that it's not coming from committed changes. The SNAPSHOT is a good addition, as I am planning to keep snapshots from master until a realease is done.

* remove publishing and keep dirty status
@lbergelson
Copy link
Author

@magicDGS I've removed the publishing bit and kept the "dirty" status.

Copy link
Owner

@magicDGS magicDGS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions about the version variable. Once they are solved, we're ready to merge and close #56

build.gradle Outdated
@@ -117,6 +124,7 @@ tasks.withType(Jar) {
// add manifest information
manifest {
attributes 'Implementation-Title': rootProject.name,
'Implementation-Version': version
'Implementation-Version': archiveVersion
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where this archiveVersion comes from? Should it also be changed above?

version gitVersion()

final isRelease = Boolean.getBoolean("release")
version = (isRelease ? gitVersion() : gitVersion() + "-SNAPSHOT")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If in the manifest we are changing the variable, is this still valid? Shouldn't it be archiveVersion?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it gets propagated but maybe it's too confusing. In the jar plugin they've deprecated the jar.version and replaced it with jar.archiveVersion property which is initialized with project.version which is this. I think I'll use project.version in both places.

@lbergelson
Copy link
Author

@magicDGS Updated

@lbergelson
Copy link
Author

@magicDGS I think I addressed your comments, let me know if you have more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants