diff --git a/.gitignore b/.gitignore index 8ebaa22..f44dc40 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ # Gradle output /.gradle /build -/gradle.properties \ No newline at end of file +/gradle.properties +buildSrc/build +buildSrc/.gradle \ No newline at end of file diff --git a/build.gradle b/build.gradle index d4c2390..6e5e4a7 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } } @@ -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") @@ -68,10 +68,6 @@ test { } } -task wrapper(type: Wrapper) { - gradleVersion = '4.7' -} - task install (type: im.status.keycard.build.InstallTask) if (testTarget == 'card') { diff --git a/buildSrc/src/main/java/im/status/keycard/build/InstallTask.java b/buildSrc/src/main/java/im/status/keycard/build/InstallTask.java index 9e8c2ad..8f94e9f 100644 --- a/buildSrc/src/main/java/im/status/keycard/build/InstallTask.java +++ b/buildSrc/src/main/java/im/status/keycard/build/InstallTask.java @@ -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); diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 91ca28c..87b738c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 16d2805..115e6ac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/gradlew b/gradlew index cccdd3d..af6708f 100755 --- a/gradlew +++ b/gradlew @@ -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" diff --git a/gradlew.bat b/gradlew.bat index f955316..6d57edc 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -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 diff --git a/src/test/java/im/status/keycard/KeycardTest.java b/src/test/java/im/status/keycard/KeycardTest.java index b1a66ba..650c4c7 100644 --- a/src/test/java/im/status/keycard/KeycardTest.java +++ b/src/test/java/im/status/keycard/KeycardTest.java @@ -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);