Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
java-version: "22"
distribution: "adopt"

- name: Publish to the Maven Central Repository
run: gradle publish
Expand Down
79 changes: 39 additions & 40 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,65 +6,64 @@ on:
- "master"
- "develop"
pull_request:
types: [ ready_for_review, synchronize, opened ]
types: [ready_for_review, synchronize, opened]

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Merge Conflict finder
uses: olivernybroe/[email protected]
- name: Merge Conflict finder
uses: olivernybroe/[email protected]

- name: Use Java Version ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 8
cache: 'gradle'
- name: Use Java Version ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: 22
cache: "gradle"

- name: Format code
run: gradle format
- name: Format code
run: gradle format

- name: Commit fixed code
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: resolve style guide violations"
branch: ${{ github.head_ref }}
- name: Commit fixed code
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: resolve style guide violations"
branch: ${{ github.head_ref }}

unit:
runs-on: ubuntu-latest
strategy:
matrix:
# test against the latest update of each major Java version, as well as specific updates of LTS versions:
java: [ 8, 11, 15, 16, 17 ]
java: [11, 15, 16, 17, 18, 19, 20, 21, 22]

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Merge Conflict finder
uses: olivernybroe/[email protected]
- name: Merge Conflict finder
uses: olivernybroe/[email protected]

- name: Use Java Version ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
cache: 'gradle'
- name: Use Java Version ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: ${{ matrix.java }}
cache: "gradle"

- name: Install
run: gradle dependencies
- name: Install
run: gradle dependencies

- name: Test
run: gradle test && gradle jacocoTestReport
- name: Test
run: gradle test && gradle jacocoTestReport

- name: Codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
- name: Codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic"
}
62 changes: 31 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.diffplug.spotless' version '5.6.1'
id 'com.diffplug.spotless' version '6.25.0'
}

group = 'org.arkecosystem'
version = '2.0.0'

sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
implementation group: 'org.bitcoinj', name: 'bitcoinj-core', version: '0.15.8'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
implementation 'com.google.guava:guava:30.1.1-jre'

testCompileOnly 'org.slf4j:slf4j-api:1.7.32'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.32'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testCompileOnly 'org.junit.jupiter:junit-jupiter-params:5.7.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
}

java {
withJavadocJar()
withSourcesJar()
implementation 'org.bitcoinj:bitcoinj-core:0.16.3'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.google.guava:guava:30.2.0-jre'

testImplementation 'org.slf4j:slf4j-api:2.0.13'
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.13'
testImplementation 'org.hamcrest:hamcrest-library:3.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.3'
}

test {
Expand All @@ -51,33 +51,33 @@ jacocoTestReport {

spotless {
java {
target fileTree(projectDir) {
include 'src/main/**/*.java'
include 'src/test/**/*.java'
exclude '**/build/**'
}
googleJavaFormat('1.1').aosp()
target 'src/**/*.java'
googleJavaFormat('1.17.0').aosp()
}
}

task formatCode(dependsOn: ['spotlessApply'])
tasks.register('formatCode') {
dependsOn 'spotlessApply'
}

task fatJar(type: Jar) {
manifest.from jar.manifest
tasks.register('fatJar', Jar) {
manifest {
attributes 'Main-Class': 'com.example.Main'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
with jar
}

build.dependsOn 'spotlessApply'

wrapper {
gradleVersion = '7.2'
gradleVersion = '8.1.1'
}

publishing {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions src/main/java/org/arkecosystem/crypto/Schnorr.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public static BigInteger[] addPoint(BigInteger[] p1, BigInteger[] p2) {
.mod(p);
else
lam =
(p2[1]
.subtract(p1[1])
(p2[1].subtract(p1[1])
.multiply(p2[0].subtract(p1[0]).modPow(p.subtract(TWO), p)))
.mod(p);

Expand Down
Loading