diff --git a/build.gradle b/build.gradle index 73eb8c0..77ab685 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -allprojects { +subprojects { apply plugin: 'java' apply plugin: 'groovy' //apply plugin: 'test-report-aggregation' @@ -39,13 +39,3 @@ allprojects { jvmArgs += '--enable-native-access=ALL-UNNAMED' } } - -// Currently only Tests are in the root module -// TODO: Move the tests to various submodules - -dependencies { - implementation project(':secp256k1-api') - implementation project(':secp256k1-bouncy') - implementation project(':secp256k1-foreign') - implementation project(':secp256k1-sandbox') -} diff --git a/secp256k1-integration-test/build.gradle b/secp256k1-integration-test/build.gradle new file mode 100644 index 0000000..f9f8a88 --- /dev/null +++ b/secp256k1-integration-test/build.gradle @@ -0,0 +1,27 @@ +plugins { + id 'java-library' +} + +tasks.withType(JavaCompile).configureEach { + //options.release = 21 +} + +ext.moduleName = 'org.bitcoinj.secp256k1.integration' + +dependencies { + implementation project(':secp256k1-api') + implementation project(':secp256k1-bouncy') + implementation project(':secp256k1-foreign') + implementation project(':secp256k1-sandbox') + + //implementation 'org.bouncycastle:bcprov-jdk18on:1.77' +} + +jar { + inputs.property("moduleName", moduleName) + manifest { + attributes 'Implementation-Title': 'Secp256k1 Integration Tests', + 'Automatic-Module-Name': moduleName, + 'Implementation-Version': archiveVersion.get() + } +} diff --git a/src/test/java/org/consensusj/secp256k1/bouncy/Bouncy256k1Test.java b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/Bouncy256k1Test.java similarity index 94% rename from src/test/java/org/consensusj/secp256k1/bouncy/Bouncy256k1Test.java rename to secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/Bouncy256k1Test.java index 62a5bfe..ef152e9 100644 --- a/src/test/java/org/consensusj/secp256k1/bouncy/Bouncy256k1Test.java +++ b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/Bouncy256k1Test.java @@ -1,4 +1,4 @@ -package org.consensusj.secp256k1.bouncy; +package org.bitcoinj.secp256k1.integration; import org.bitcoinj.secp256k1.api.P256k1PubKey; import org.bitcoinj.secp256k1.bouncy.Bouncy256k1; diff --git a/src/test/java/org/consensusj/secp256k1/CurveTest.java b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/CurveTest.java similarity index 96% rename from src/test/java/org/consensusj/secp256k1/CurveTest.java rename to secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/CurveTest.java index 3fb1c2e..875d3ed 100644 --- a/src/test/java/org/consensusj/secp256k1/CurveTest.java +++ b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/CurveTest.java @@ -1,4 +1,4 @@ -package org.consensusj.secp256k1; +package org.bitcoinj.secp256k1.integration; import org.bitcoinj.secp256k1.api.P256k1PrivKey; import org.bitcoinj.secp256k1.api.P256k1PubKey; diff --git a/src/test/java/org/consensusj/secp256k1/api/PrivKeyDataTest.java b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/PrivKeyDataTest.java similarity index 94% rename from src/test/java/org/consensusj/secp256k1/api/PrivKeyDataTest.java rename to secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/PrivKeyDataTest.java index e5d1827..46b59c7 100644 --- a/src/test/java/org/consensusj/secp256k1/api/PrivKeyDataTest.java +++ b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/PrivKeyDataTest.java @@ -1,4 +1,4 @@ -package org.consensusj.secp256k1.api; +package org.bitcoinj.secp256k1.integration; import org.bitcoinj.secp256k1.api.P256k1PrivKey; import org.bitcoinj.secp256k1.bouncy.BouncyPrivKey; diff --git a/src/test/java/org/consensusj/secp256k1/foreign/Secp256k1ForeignTest.java b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/Secp256k1ForeignTest.java similarity index 96% rename from src/test/java/org/consensusj/secp256k1/foreign/Secp256k1ForeignTest.java rename to secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/Secp256k1ForeignTest.java index c6e4fa9..1f74011 100644 --- a/src/test/java/org/consensusj/secp256k1/foreign/Secp256k1ForeignTest.java +++ b/secp256k1-integration-test/src/test/java/org/bitcoinj/secp256k1/integration/Secp256k1ForeignTest.java @@ -1,4 +1,4 @@ -package org.consensusj.secp256k1.foreign; +package org.bitcoinj.secp256k1.integration; import org.bitcoinj.secp256k1.api.P256k1PubKey; import org.bitcoinj.secp256k1.bouncy.BouncyPrivKey; diff --git a/settings.gradle b/settings.gradle index 4cc56f1..887183c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,7 @@ include 'secp256k1-api' // API interface library include 'secp256k1-bouncy' // Bouncy Castle implementation include 'secp256k1-foreign' // Java Foreign Memory & Function ("Panama") implementation include 'secp256k1-bitcoinj' // bitcoinj integration utilities and tests (P2TR address generation, etc.) +include 'secp256k1-integration-test' // Integration tests of API implementations (foreign and bouncy) include 'secp256k1-examples-java' // Java examples include 'secp256k1-examples-kotlin' // Kotlin examples include 'secp256k1-sandbox' // Sandbox (experimental code that may be removed)