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

Migrate from Maven to Gradle for building. #1533

Merged
merged 1 commit into from
May 1, 2018

Conversation

schildbach
Copy link
Member

@schildbach schildbach commented Mar 11, 2018

This targets Gradle 3.2.1, as this is the version that will be in the upcoming Ubuntu 18.04 LTS.

You can use:

  • gradle clean
  • gradle generateProto
  • gradle build
  • gradle install

Currently, the protobuf classes are generated on each build. I hope this will not cause unwanted changes in these classes due to differences in protobuf libraries. If it turns out problematic, maybe in future we should not put generated classes into git.

Dependency pinning (to certain hashes) is gone for now. I doubt this will add much security if the feature isn't built into gradle itself. As long as it's a plugin, there is the trust bootstrapping problem.

Bundled jars are currently gone. If someone still needs them, please submit a PR for building them again. The Windows versions of the tool launcher scripts (e.g. wallet-tool.cmd) are gone, because I have no Windows to test with. If you have Windows, feel free to help here.

Because Gradle has no optional dependencies, there is now a dependency on org.fusesource.leveldbjni:leveldbjni-all:1.8 that you likely want to manually exclude from your build.

@yichen88
Copy link

README.md missing change?

@schildbach schildbach force-pushed the maven-to-gradle branch 2 times, most recently from b300ca1 to 80aba73 Compare March 22, 2018 18:52
@schildbach
Copy link
Member Author

Good catch! Amended, and rebased.

@schildbach
Copy link
Member Author

schildbach commented May 1, 2018

I'll skip the signing/uploading part. I think this in fact shouldn't be part of the build process.

@schildbach schildbach merged commit aaa5262 into bitcoinj:master May 1, 2018
@schildbach
Copy link
Member Author

Merged!

@natzei
Copy link
Contributor

natzei commented May 2, 2018

I'm rebasing a PR and I'm using protoc version 3.5.1.

Build is success, but the generated classes are using new protobuf classes with suffix V3, e.g. com.google.protobuf.GeneratedMessageV3.Builder<?>.
Aren't the generated classes supposed to be ignored? If not, what should I do?

Thank you so much

@schildbach
Copy link
Member Author

Maybe we should exclude the generated protobuf files from version control?

@natzei
Copy link
Contributor

natzei commented May 2, 2018

I think yes, since the build generates fresh ones.

@schildbach schildbach deleted the maven-to-gradle branch May 5, 2018 17:10
@schildbach
Copy link
Member Author

@natzei See 002fe81

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.

None yet

3 participants