I'm trying to build a mixed project having following components: 1: Spring Boot 2: rSocket 3: gRPC
Its a multi container app, where container 1 (Spring & rSocket, Java) interacts with container 2 (rSocker, Spring, gRPC, Java) via Spring-rSocket. It then passes on the information to container 3 (gRPC, Python) via rSocket-RPC.
Been trying since past 3 days but was able to setup a maven project due to conflicts in dependencies thus causing netty calls to fail.
Started setting up Gradle and I'm pretty new to gradle compared to maven. Came up with following script for proto task:
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.6.1'
}
generatedFilesBaseDir = "${projectDir}/build/generated-sources/"
plugins {
rsocketRpc {
artifact = 'io.rsocket.rpc:rsocket-rpc-protobuf:0.2.17'
}
}
generateProtoTasks {
all()*.plugins {
rsocketRpc {}
}
}
}
And following pluginManagement in settings.gradle
pluginManagement {
repositories {
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repository.jboss.org/nexus/content/repositories/public/' }
// maven { url 'https://jcenter.bintray.com/' }
jcenter()
maven { url 'https://dl.bintray.com/netifi/netifi-oss/' }
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'org.springframework.boot') {
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
}
}
}
}
But the build always fails saying it isn't able to find plugin:
AzureAD+DebasishKanhar@DESKTOP-COEQQIB MINGW64 /d/Projects/Projects/Freelancing/Elysium Analytics/sia/graphdb/snowflake-graphdb/graphextractor_gradle (custom-graphdb-snowflake)
$ gradle build
> Task :generateProto FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generateProto'.
> Could not resolve all files for configuration ':protobufToolsLocator_rsocketRpc'.
> Could not find rsocket-rpc-protobuf-0.2.17-windows-x86_64.exe (io.rsocket.rpc:rsocket-rpc-protobuf:0.2.17).
Searched in the following locations:
https://repo.maven.apache.org/maven2/io/rsocket/rpc/rsocket-rpc-protobuf/0.2.17/rsocket-rpc-protobuf-0.2.17-windows-x86_64.exe
Looks like its not finding the plugin in default maven repo which is correct as I know that the protoc plugin is hosted in jcenter. But if you see, I've added the URL in pluginManagement but then why doesn't my build script catch the jcenter repository?
Any help would be really appreciated :-)