Skip to content

Commit

Permalink
Add integration-test module
Browse files Browse the repository at this point in the history
* Add Gradle module for integration tests
* Move remaining tests from root project to integration test module
* Remove now unneeded dependencies block in `build.gradle`
* Use `subprojects` rather than `allprojects` for main closure in `build.gradle`
  • Loading branch information
msgilligan committed Mar 4, 2024
1 parent bf0b94c commit 666df1d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 15 deletions.
12 changes: 1 addition & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
allprojects {
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
//apply plugin: 'test-report-aggregation'
Expand Down Expand Up @@ -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')
}
27 changes: 27 additions & 0 deletions secp256k1-integration-test/build.gradle
Original file line number Diff line number Diff line change
@@ -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()
}
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 666df1d

Please sign in to comment.