Skip to content

Commit

Permalink
improve build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
bitgamma committed Dec 8, 2021
1 parent 63dfa6d commit ec7ceff
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
# Gradle output
/.gradle
/build
/gradle.properties
/gradle.properties
buildSrc/build
buildSrc/.gradle
8 changes: 2 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {

dependencies {
classpath 'com.fidesmo:gradle-javacard:0.2.7'
classpath 'com.github.status-im.status-keycard-java:desktop:3.0.0'
classpath 'com.github.status-im.status-keycard-java:desktop:3.0.4'
}
}

Expand Down Expand Up @@ -55,7 +55,7 @@ dependencies {
testCompile(files("../jcardsim/jcardsim-3.0.5-SNAPSHOT.jar"))
testCompile('org.web3j:core:2.3.1')
testCompile('org.bitcoinj:bitcoinj-core:0.14.5')
testCompile('com.github.status-im.status-keycard-java:desktop:3.0.0')
testCompile('com.github.status-im.status-keycard-java:desktop:3.0.4')
testCompile('org.bouncycastle:bcprov-jdk15on:1.60')
testCompile("org.junit.jupiter:junit-jupiter-api:5.1.1")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.1.1")
Expand All @@ -68,10 +68,6 @@ test {
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}

task install (type: im.status.keycard.build.InstallTask)

if (testTarget == 'card') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void install() {
logger.info("Deleting the old instances and package (if present)");
cmdSet.deleteKeycardInstancesAndPackage();
logger.info("Loading the new package");
cmdSet.loadKeycardPackage(new FileInputStream("build/javacard/im/status/keycard/javacard/keycard.cap"), new LoadCallback() {
cmdSet.loadKeycardPackage(new FileInputStream(this.getProject().file("build/javacard/im/status/keycard/javacard/keycard.cap")), new LoadCallback() {
@Override
public void blockLoaded(int loadedBlock, int blockCount) {
logger.info("Loaded block " + loadedBlock + "/" + blockCount);
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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-4.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/im/status/keycard/KeycardTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void openSecureChannelTest() throws Exception {
secureChannel.setOpen();
response = cmdSet.mutuallyAuthenticate();
assertEquals(0x9000, response.getSw());
assertTrue(secureChannel.verifyMutuallyAuthenticateResponse(response));
secureChannel.verifyMutuallyAuthenticateResponse(response);

// Verify that the channel is open
response = cmdSet.getStatus(KeycardApplet.GET_STATUS_P1_APPLICATION);
Expand Down

0 comments on commit ec7ceff

Please sign in to comment.