diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml new file mode 100644 index 00000000..fda5432c --- /dev/null +++ b/.github/workflows/gradle-build.yml @@ -0,0 +1,26 @@ +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Build + +on: + push + +jobs: + build: + + runs-on: ubuntu-20.04 + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + + - name: Build with Gradle + run: gradle build diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100644 index 00000000..e906088b --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,35 @@ +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Package + +## TODO it should be bound to releases +on: + workflow_dispatch + +jobs: + publish: + + runs-on: ubuntu-20.04 + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + + - name: Build with Gradle + run: gradle build + + # The USERNAME and TOKEN need to correspond to the credentials environment variables used in + # the publishing section of your build.gradle + - name: Publish to GitHub Packages + run: gradle publish + env: + USERNAME: ${{ github.actor }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index f9891d8c..aca5536d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ plugins { id 'io.freefair.lombok' version '6.1.0' apply false + id 'maven-publish' } allprojects { @@ -15,6 +16,7 @@ allprojects { subprojects { apply plugin: 'java' apply plugin: 'io.freefair.lombok' + apply plugin: 'maven-publish' targetCompatibility = '1.8' sourceCompatibility = '1.8' @@ -34,4 +36,23 @@ subprojects { test { useJUnitPlatform() } + + publishing { + publications { + gpr(MavenPublication) { + from(components.java) + } + } + + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/strategyobject/substrate-client-java" + credentials { + username = System.getenv("USERNAME") + password = System.getenv("TOKEN") + } + } + } + } } \ No newline at end of file diff --git a/crypto/build.gradle b/crypto/build.gradle index 9df1f2fb..f17134d2 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -18,10 +18,11 @@ task compileRust { workingDir 'src/jni-crypto' commandLine 'cargo', 'build', '--release', '--target=x86_64-unknown-linux-gnu', '--target-dir=../../build/jni-crypto' } - exec { - workingDir 'src/jni-crypto' - commandLine 'cargo', 'build', '--release', '--target=x86_64-pc-windows-gnu', '--target-dir=../../build/jni-crypto' - } +// TODO the build of the native library will be moved out of the project +// exec { +// workingDir 'src/jni-crypto' +// commandLine 'cargo', 'build', '--release', '--target=x86_64-pc-windows-gnu', '--target-dir=../../build/jni-crypto' +// } } } diff --git a/rpc/build.gradle b/rpc/build.gradle index f453ed1a..d99c5891 100644 --- a/rpc/build.gradle +++ b/rpc/build.gradle @@ -1,6 +1,6 @@ dependencies { implementation project(':transport') - implementation project(':rpc:sections') - implementation project(':rpc:core') - implementation project(':rpc:codegen') + implementation project(':rpc:rpc-sections') + implementation project(':rpc:rpc-core') + implementation project(':rpc:rpc-codegen') } \ No newline at end of file diff --git a/rpc/codegen/build.gradle b/rpc/rpc-codegen/build.gradle similarity index 79% rename from rpc/codegen/build.gradle rename to rpc/rpc-codegen/build.gradle index e5f40859..bd43b14d 100644 --- a/rpc/codegen/build.gradle +++ b/rpc/rpc-codegen/build.gradle @@ -1,6 +1,6 @@ dependencies { implementation project(':common') - implementation project(':rpc:core') + implementation project(':rpc:rpc-core') implementation project(':scale') implementation project(':scale:scale-codegen') implementation project(':transport') @@ -12,7 +12,7 @@ dependencies { testImplementation 'com.google.testing.compile:compile-testing:0.19' testImplementation 'com.google.code.gson:gson:2.8.8' - testCompileOnly project(':rpc:codegen') - testAnnotationProcessor project(':rpc:codegen') + testCompileOnly project(':rpc:rpc-codegen') + testAnnotationProcessor project(':rpc:rpc-codegen') testAnnotationProcessor project(':scale:scale-codegen') } \ No newline at end of file diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/Constants.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/Constants.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/Constants.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/Constants.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/DecoderCompositor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/DecoderCompositor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/DecoderCompositor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/DecoderCompositor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderAnnotatedClass.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderAnnotatedClass.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderAnnotatedClass.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderAnnotatedClass.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/EncoderCompositor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/EncoderCompositor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/EncoderCompositor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/EncoderCompositor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderAnnotatedClass.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderAnnotatedClass.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderAnnotatedClass.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderAnnotatedClass.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/CompoundRpcMethodProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/CompoundRpcMethodProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/CompoundRpcMethodProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/CompoundRpcMethodProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/Constants.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/Constants.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/Constants.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/Constants.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcAnnotatedInterface.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcAnnotatedInterface.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcAnnotatedInterface.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcAnnotatedInterface.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcCallProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcCallProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcCallProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcCallProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcGeneratedSectionFactory.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcGeneratedSectionFactory.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcGeneratedSectionFactory.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcGeneratedSectionFactory.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceInitializationException.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceInitializationException.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceInitializationException.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceInitializationException.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodValidatingProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodValidatingProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodValidatingProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceMethodValidatingProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcMethodProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcMethodProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcMethodProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcMethodProcessor.java diff --git a/rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSubscriptionProcessor.java b/rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSubscriptionProcessor.java similarity index 100% rename from rpc/codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSubscriptionProcessor.java rename to rpc/rpc-codegen/src/main/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSubscriptionProcessor.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessorTests.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessorTests.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessorTests.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/decoder/RpcDecoderProcessorTests.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessorTests.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessorTests.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessorTests.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/encoder/RpcEncoderProcessorTests.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessorTest.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessorTest.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessorTest.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcInterfaceProcessorTest.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSectionFactoryTest.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSectionFactoryTest.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSectionFactoryTest.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/sections/RpcSectionFactoryTest.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestDecodable.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestDecodable.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestDecodable.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestDecodable.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestEncodable.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestEncodable.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestEncodable.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestEncodable.java diff --git a/rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestSection.java b/rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestSection.java similarity index 100% rename from rpc/codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestSection.java rename to rpc/rpc-codegen/src/test/java/com/strategyobject/substrateclient/rpc/codegen/substitutes/TestSection.java diff --git a/rpc/codegen/src/test/resources/ClassSection.java b/rpc/rpc-codegen/src/test/resources/ClassSection.java similarity index 100% rename from rpc/codegen/src/test/resources/ClassSection.java rename to rpc/rpc-codegen/src/test/resources/ClassSection.java diff --git a/rpc/codegen/src/test/resources/NamelessSection.java b/rpc/rpc-codegen/src/test/resources/NamelessSection.java similarity index 100% rename from rpc/codegen/src/test/resources/NamelessSection.java rename to rpc/rpc-codegen/src/test/resources/NamelessSection.java diff --git a/rpc/codegen/src/test/resources/RpcDecodable.java b/rpc/rpc-codegen/src/test/resources/RpcDecodable.java similarity index 100% rename from rpc/codegen/src/test/resources/RpcDecodable.java rename to rpc/rpc-codegen/src/test/resources/RpcDecodable.java diff --git a/rpc/codegen/src/test/resources/RpcDecodableInterface.java b/rpc/rpc-codegen/src/test/resources/RpcDecodableInterface.java similarity index 100% rename from rpc/codegen/src/test/resources/RpcDecodableInterface.java rename to rpc/rpc-codegen/src/test/resources/RpcDecodableInterface.java diff --git a/rpc/codegen/src/test/resources/RpcDecodableWithoutSetter.java b/rpc/rpc-codegen/src/test/resources/RpcDecodableWithoutSetter.java similarity index 100% rename from rpc/codegen/src/test/resources/RpcDecodableWithoutSetter.java rename to rpc/rpc-codegen/src/test/resources/RpcDecodableWithoutSetter.java diff --git a/rpc/codegen/src/test/resources/RpcEncodable.java b/rpc/rpc-codegen/src/test/resources/RpcEncodable.java similarity index 100% rename from rpc/codegen/src/test/resources/RpcEncodable.java rename to rpc/rpc-codegen/src/test/resources/RpcEncodable.java diff --git a/rpc/codegen/src/test/resources/RpcEncodableInterface.java b/rpc/rpc-codegen/src/test/resources/RpcEncodableInterface.java similarity index 100% rename from rpc/codegen/src/test/resources/RpcEncodableInterface.java rename to rpc/rpc-codegen/src/test/resources/RpcEncodableInterface.java diff --git a/rpc/codegen/src/test/resources/RpcEncodableWithoutGetter.java b/rpc/rpc-codegen/src/test/resources/RpcEncodableWithoutGetter.java similarity index 100% rename from rpc/codegen/src/test/resources/RpcEncodableWithoutGetter.java rename to rpc/rpc-codegen/src/test/resources/RpcEncodableWithoutGetter.java diff --git a/rpc/codegen/src/test/resources/SectionWithAmbiguousAnnotatedMethod.java b/rpc/rpc-codegen/src/test/resources/SectionWithAmbiguousAnnotatedMethod.java similarity index 100% rename from rpc/codegen/src/test/resources/SectionWithAmbiguousAnnotatedMethod.java rename to rpc/rpc-codegen/src/test/resources/SectionWithAmbiguousAnnotatedMethod.java diff --git a/rpc/codegen/src/test/resources/SectionWithIncorrectReturnOfMethod.java b/rpc/rpc-codegen/src/test/resources/SectionWithIncorrectReturnOfMethod.java similarity index 100% rename from rpc/codegen/src/test/resources/SectionWithIncorrectReturnOfMethod.java rename to rpc/rpc-codegen/src/test/resources/SectionWithIncorrectReturnOfMethod.java diff --git a/rpc/codegen/src/test/resources/SectionWithIncorrectReturnOfSubscription.java b/rpc/rpc-codegen/src/test/resources/SectionWithIncorrectReturnOfSubscription.java similarity index 100% rename from rpc/codegen/src/test/resources/SectionWithIncorrectReturnOfSubscription.java rename to rpc/rpc-codegen/src/test/resources/SectionWithIncorrectReturnOfSubscription.java diff --git a/rpc/codegen/src/test/resources/SectionWithManyCallbacks.java b/rpc/rpc-codegen/src/test/resources/SectionWithManyCallbacks.java similarity index 100% rename from rpc/codegen/src/test/resources/SectionWithManyCallbacks.java rename to rpc/rpc-codegen/src/test/resources/SectionWithManyCallbacks.java diff --git a/rpc/codegen/src/test/resources/SectionWithoutAnnotatedMethod.java b/rpc/rpc-codegen/src/test/resources/SectionWithoutAnnotatedMethod.java similarity index 100% rename from rpc/codegen/src/test/resources/SectionWithoutAnnotatedMethod.java rename to rpc/rpc-codegen/src/test/resources/SectionWithoutAnnotatedMethod.java diff --git a/rpc/codegen/src/test/resources/SectionWithoutCallback.java b/rpc/rpc-codegen/src/test/resources/SectionWithoutCallback.java similarity index 100% rename from rpc/codegen/src/test/resources/SectionWithoutCallback.java rename to rpc/rpc-codegen/src/test/resources/SectionWithoutCallback.java diff --git a/rpc/codegen/src/test/resources/TestSection.java b/rpc/rpc-codegen/src/test/resources/TestSection.java similarity index 100% rename from rpc/codegen/src/test/resources/TestSection.java rename to rpc/rpc-codegen/src/test/resources/TestSection.java diff --git a/rpc/core/build.gradle b/rpc/rpc-core/build.gradle similarity index 100% rename from rpc/core/build.gradle rename to rpc/rpc-core/build.gradle diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/DecoderPair.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/DecoderPair.java similarity index 81% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/DecoderPair.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/DecoderPair.java index fabc2c30..903107b7 100644 --- a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/DecoderPair.java +++ b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/DecoderPair.java @@ -12,7 +12,7 @@ public class DecoderPair { public RpcDecoder getDecoderOrThrow() { if (decoder == null) { - throw new NullPointerException(); + throw new NullPointerException("RpcDecoder is null."); } return decoder; @@ -20,7 +20,7 @@ public RpcDecoder getDecoderOrThrow() { public ScaleReader getScaleReaderOrThrow() { if (scaleReader == null) { - throw new NullPointerException(); + throw new NullPointerException("ScaleReader is null."); } return scaleReader; diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/EncoderPair.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/EncoderPair.java similarity index 81% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/EncoderPair.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/EncoderPair.java index e0d8893c..01870be5 100644 --- a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/EncoderPair.java +++ b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/EncoderPair.java @@ -12,7 +12,7 @@ public class EncoderPair { public RpcEncoder getEncoderOrThrow() { if (encoder == null) { - throw new NullPointerException(); + throw new NullPointerException("RpcEncoder is null."); } return encoder; @@ -20,7 +20,7 @@ public RpcEncoder getEncoderOrThrow() { public ScaleWriter getScaleWriterOrThrow() { if (scaleWriter == null) { - throw new NullPointerException(); + throw new NullPointerException("ScaleWriter is null."); } return scaleWriter; diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcEncoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcEncoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcEncoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcEncoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcSelfEncodable.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcSelfEncodable.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcSelfEncodable.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/RpcSelfEncodable.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/AutoRegister.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/AutoRegister.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/AutoRegister.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/AutoRegister.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/Ignore.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/Ignore.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/Ignore.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/Ignore.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcCall.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcCall.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcCall.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcCall.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcEncoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcEncoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcEncoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcEncoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcInterface.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcInterface.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcInterface.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcInterface.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcSubscription.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcSubscription.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcSubscription.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/annotations/RpcSubscription.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/AbstractDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/AbstractDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/AbstractDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/AbstractDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/BooleanDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/BooleanDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/BooleanDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/BooleanDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ByteDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ByteDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ByteDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ByteDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/DoubleDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/DoubleDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/DoubleDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/DoubleDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/FloatDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/FloatDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/FloatDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/FloatDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/IntDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/IntDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/IntDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/IntDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ListDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ListDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ListDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ListDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/LongDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/LongDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/LongDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/LongDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/MapDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/MapDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/MapDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/MapDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ShortDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ShortDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ShortDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/ShortDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/StringDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/StringDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/StringDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/StringDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/VoidDecoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/VoidDecoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/VoidDecoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/decoders/VoidDecoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/ListEncoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/ListEncoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/ListEncoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/ListEncoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/MapEncoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/MapEncoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/MapEncoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/MapEncoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/PlainEncoder.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/PlainEncoder.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/PlainEncoder.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/encoders/PlainEncoder.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcDecoderRegistry.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcDecoderRegistry.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcDecoderRegistry.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcDecoderRegistry.java diff --git a/rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcEncoderRegistry.java b/rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcEncoderRegistry.java similarity index 100% rename from rpc/core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcEncoderRegistry.java rename to rpc/rpc-core/src/main/java/com/strategyobject/substrateclient/rpc/core/registries/RpcEncoderRegistry.java diff --git a/rpc/core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownDecoderTests.java b/rpc/rpc-core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownDecoderTests.java similarity index 100% rename from rpc/core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownDecoderTests.java rename to rpc/rpc-core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownDecoderTests.java diff --git a/rpc/core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownEncoderTests.java b/rpc/rpc-core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownEncoderTests.java similarity index 100% rename from rpc/core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownEncoderTests.java rename to rpc/rpc-core/src/test/java/com/strategyobject/substrateclient/rpc/core/decoders/KnownEncoderTests.java diff --git a/rpc/sections/build.gradle b/rpc/rpc-sections/build.gradle similarity index 75% rename from rpc/sections/build.gradle rename to rpc/rpc-sections/build.gradle index 8246bc0a..74959cee 100644 --- a/rpc/sections/build.gradle +++ b/rpc/rpc-sections/build.gradle @@ -1,15 +1,15 @@ dependencies { - compileOnly project(':rpc:codegen') - annotationProcessor project(':rpc:codegen') - compileOnly project(':rpc:core') + compileOnly project(':rpc:rpc-codegen') + annotationProcessor project(':rpc:rpc-codegen') + compileOnly project(':rpc:rpc-core') compileOnly project(':transport') implementation project(':types') implementation project(':rpc:rpc-types') implementation project(':scale') - testImplementation project(':rpc:codegen') + testImplementation project(':rpc:rpc-codegen') testImplementation project(':tests') - testCompileOnly project(':rpc:core') + testCompileOnly project(':rpc:rpc-core') testCompileOnly project(':common') testCompileOnly project(':transport') testImplementation project(':crypto') diff --git a/rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Author.java b/rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Author.java similarity index 100% rename from rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Author.java rename to rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Author.java diff --git a/rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Chain.java b/rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Chain.java similarity index 100% rename from rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Chain.java rename to rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/Chain.java diff --git a/rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/State.java b/rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/State.java similarity index 100% rename from rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/State.java rename to rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/State.java diff --git a/rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/System.java b/rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/System.java similarity index 100% rename from rpc/sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/System.java rename to rpc/rpc-sections/src/main/java/com/strategyobject/substrateclient/rpc/sections/System.java diff --git a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/AuthorTests.java b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/AuthorTests.java similarity index 100% rename from rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/AuthorTests.java rename to rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/AuthorTests.java diff --git a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/ChainTests.java b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/ChainTests.java similarity index 100% rename from rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/ChainTests.java rename to rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/ChainTests.java diff --git a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/StateTests.java b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/StateTests.java similarity index 100% rename from rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/StateTests.java rename to rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/StateTests.java diff --git a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/SystemTests.java b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/SystemTests.java similarity index 79% rename from rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/SystemTests.java rename to rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/SystemTests.java index a3802ea1..3d0945d9 100644 --- a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/SystemTests.java +++ b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/SystemTests.java @@ -44,17 +44,16 @@ void accountNextIndex() throws ExecutionException, InterruptedException, Timeout RpcEncoderRegistry encoderRegistry = mock(RpcEncoderRegistry.class); when(encoderRegistry.resolve(AccountId.class)) .thenReturn((source, encoders) -> "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"); - mockStatic(RpcEncoderRegistry.class) - .when(RpcEncoderRegistry::getInstance) - .thenReturn(encoderRegistry); - - - val result = rpcSection.accountNextIndex(AccountId.fromBytes( - new byte[]{ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 - })).get(WAIT_TIMEOUT, TimeUnit.SECONDS); - - assertEquals(0, result); + try (val utils = mockStatic(RpcEncoderRegistry.class)) { + utils.when(RpcEncoderRegistry::getInstance) + .thenReturn(encoderRegistry); + val result = rpcSection.accountNextIndex(AccountId.fromBytes( + new byte[]{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 + })).get(WAIT_TIMEOUT, TimeUnit.SECONDS); + + assertEquals(0, result); + } } } } diff --git a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/BalanceTransfer.java b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/BalanceTransfer.java similarity index 100% rename from rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/BalanceTransfer.java rename to rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/BalanceTransfer.java diff --git a/rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/ExtrinsicBuilder.java b/rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/ExtrinsicBuilder.java similarity index 100% rename from rpc/sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/ExtrinsicBuilder.java rename to rpc/rpc-sections/src/test/java/com/strategyobject/substrateclient/rpc/sections/substitutes/ExtrinsicBuilder.java diff --git a/rpc/rpc-types/build.gradle b/rpc/rpc-types/build.gradle index cd17727b..de5df6ad 100644 --- a/rpc/rpc-types/build.gradle +++ b/rpc/rpc-types/build.gradle @@ -1,8 +1,8 @@ dependencies { implementation project(':types') implementation project(':scale') - implementation project(':rpc:core') + implementation project(':rpc:rpc-core') implementation project(':common') - annotationProcessor project(':rpc:codegen') + annotationProcessor project(':rpc:rpc-codegen') annotationProcessor project(':scale:scale-codegen') } \ No newline at end of file diff --git a/rpc/src/main/java/com/strategyobject/substrateclient/rpc/Rpc.java b/rpc/src/main/java/com/strategyobject/substrateclient/rpc/Rpc.java index 6fbdc992..dd8b99df 100644 --- a/rpc/src/main/java/com/strategyobject/substrateclient/rpc/Rpc.java +++ b/rpc/src/main/java/com/strategyobject/substrateclient/rpc/Rpc.java @@ -1,10 +1,15 @@ package com.strategyobject.substrateclient.rpc; import com.strategyobject.substrateclient.rpc.sections.Author; +import com.strategyobject.substrateclient.rpc.sections.Chain; import com.strategyobject.substrateclient.rpc.sections.State; public interface Rpc { Author getAuthor(); + Chain getChain(); + State getState(); + + System getSystem(); } diff --git a/settings.gradle b/settings.gradle index dd782284..8e765dce 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,10 +4,10 @@ include 'api' include 'common' include 'crypto' include 'rpc' -include 'rpc:codegen' -include 'rpc:core' +include 'rpc:rpc-codegen' +include 'rpc:rpc-core' include 'rpc:rpc-types' -include 'rpc:sections' +include 'rpc:rpc-sections' include 'types' include 'scale' include 'scale:scale-codegen' diff --git a/transport/build.gradle b/transport/build.gradle index 03327ec0..04fdfcd4 100644 --- a/transport/build.gradle +++ b/transport/build.gradle @@ -10,4 +10,4 @@ dependencies { testImplementation 'org.testcontainers:junit-jupiter:1.16.0' testImplementation "org.testcontainers:toxiproxy:1.16.0" testImplementation 'org.awaitility:awaitility:4.1.0' -} +} \ No newline at end of file