mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-13 19:37:49 +01:00
Add secp-api, secp-bouncy and a smoke test
This commit is contained in:
parent
1090649211
commit
276ecb16c5
5 changed files with 28 additions and 3 deletions
|
@ -21,7 +21,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs.addAll(['--release', '8'])
|
options.compilerArgs.addAll(['--release', '9'])
|
||||||
options.compilerArgs << '-Xlint:deprecation'
|
options.compilerArgs << '-Xlint:deprecation'
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@ buildscript {
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url 'https://gitlab.com/api/v4/projects/55956336/packages/maven' // secp256k1-jdk
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'org.bitcoinj'
|
group = 'org.bitcoinj'
|
||||||
|
|
|
@ -13,6 +13,8 @@ dependencies {
|
||||||
api 'org.bouncycastle:bcprov-jdk15to18:1.80'
|
api 'org.bouncycastle:bcprov-jdk15to18:1.80'
|
||||||
api 'com.google.guava:guava:33.4.0-android'
|
api 'com.google.guava:guava:33.4.0-android'
|
||||||
api 'com.google.protobuf:protobuf-javalite:4.29.3'
|
api 'com.google.protobuf:protobuf-javalite:4.29.3'
|
||||||
|
api 'org.bitcoinj.secp:secp-api:0.1'
|
||||||
|
implementation 'org.bitcoinj.secp:secp-bouncy:0.1'
|
||||||
implementation 'org.slf4j:slf4j-api:2.0.16'
|
implementation 'org.slf4j:slf4j-api:2.0.16'
|
||||||
|
|
||||||
testImplementation project(':bitcoinj-test-support')
|
testImplementation project(':bitcoinj-test-support')
|
||||||
|
@ -40,7 +42,7 @@ if (GradleVersion.current() > gradleVersionTargetJVM) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs.addAll(['--release', '8'])
|
options.compilerArgs.addAll(['--release', '9'])
|
||||||
options.compilerArgs << '-Xlint:deprecation'
|
options.compilerArgs << '-Xlint:deprecation'
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
|
|
20
core/src/test/java/org/bitcoinj/crypto/SecpJdkSmokeTest.java
Normal file
20
core/src/test/java/org/bitcoinj/crypto/SecpJdkSmokeTest.java
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
package org.bitcoinj.crypto;
|
||||||
|
|
||||||
|
import org.bitcoinj.secp.api.P256K1KeyPair;
|
||||||
|
import org.bitcoinj.secp.api.Secp256k1;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A quick test to make sure we can load and execute the secp-api and secp-bouncy.
|
||||||
|
*/
|
||||||
|
public class SecpJdkSmokeTest {
|
||||||
|
@Test
|
||||||
|
public void smoke() {
|
||||||
|
try (Secp256k1 secp = Secp256k1.getByName("bouncy-castle")) {
|
||||||
|
P256K1KeyPair keypair = secp.ecKeyPairCreate();
|
||||||
|
assertNotNull(keypair);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs.addAll(['--release', '8'])
|
options.compilerArgs.addAll(['--release', '9'])
|
||||||
options.compilerArgs << '-Xlint:deprecation'
|
options.compilerArgs << '-Xlint:deprecation'
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue