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

Remove copied proto src #123

Open
wants to merge 6 commits into
base: replace-maven-with-gradle
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@
javadoc/
/build/
.gradle
.idea
.idea
/src/main/proto/
/checkouts/
/checkouts/hedera-protobufs/
/checkouts/hedera-protobufs/.gradle/file-system.probe
/checkouts/hedera-protobufs/mirror/.gradle/file-system.probe
/checkouts/hedera-protobufs/services/.gradle/file-system.probe
/checkouts/hedera-protobufs/streams/.gradle/file-system.probe
19 changes: 19 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ java {
withSourcesJar()
}

tasks.clean {
doFirst {
delete("${rootDir}/src/main/proto")
}
}

sourceSets {
main {
proto {
srcDir("checkouts/hedera-protobufs/streams")
srcDir("checkouts/hedera-protobufs/services")
srcDir("checkouts/hedera-protobufs/mirror")
exclude { file: FileTreeElement ->
return@exclude file.file.endsWith("mirror/consensus_service.proto")
}
}
}
}

protobuf {
plugins {
create("grpc").artifact = "io.grpc:protoc-gen-grpc-java:1.50.2"
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
version = "0.13.0-alpha.4-SNAPSHOT"
version = "0.13.0-alpha.4-SNAPSHOT"
hapiVersion = "v0.31.0"
26 changes: 26 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
import me.champeau.gradle.igp.gitRepositories

rootProject.name = "hedera-protobuf-java-api"

// Add local maven build directory to plugin repos
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}

// Use GIT plugin to clone HAPI protobuf files
// See documentation https://melix.github.io/includegit-gradle-plugin/latest/index.html
plugins {
id("me.champeau.includegit") version "0.1.5"
}
gitRepositories {
include("hedera-protobufs") {
autoInclude.set(false)
uri.set("https://github.com/hashgraph/hedera-protobufs.git")
// optional, set what branch to use
// branch.set("main")
// you can also use a tag
tag.set("v0.31.0")
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Need to actually use the hapiVersion property.

Suggested change
gitRepositories {
include("hedera-protobufs") {
autoInclude.set(false)
uri.set("https://github.com/hashgraph/hedera-protobufs.git")
// optional, set what branch to use
// branch.set("main")
// you can also use a tag
tag.set("v0.31.0")
}
}
val hapiVersion by project
gitRepositories {
include("hedera-protobufs") {
autoInclude.set(false)
uri.set("https://github.com/hashgraph/hedera-protobufs.git")
// optional, set what branch to use
// branch.set("main")
// you can also use a tag
tag.set(hapiVersion)
}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I cleaned up those, I could not us hapiVersion as seems like settings happens before properties file is loaded. So I updated comments in code and updated README explaining

47 changes: 0 additions & 47 deletions src/main/proto/AccountBalanceFile.proto

This file was deleted.

420 changes: 0 additions & 420 deletions src/main/proto/BasicTypes.proto

This file was deleted.

59 changes: 0 additions & 59 deletions src/main/proto/ConsensusCreateTopic.proto

This file was deleted.

33 changes: 0 additions & 33 deletions src/main/proto/ConsensusDeleteTopic.proto

This file was deleted.

51 changes: 0 additions & 51 deletions src/main/proto/ConsensusGetTopicInfo.proto

This file was deleted.

112 changes: 0 additions & 112 deletions src/main/proto/ConsensusService.proto

This file was deleted.

Loading