This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from JavaCardSpot-dev/pullrequest/build
Add gradle build + Travis CI + codecov
- Loading branch information
Showing
10 changed files
with
110 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.gradle/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "libs-sdks"] | ||
path = libs-sdks | ||
url = https://github.com/martinpaljak/oracle_javacard_sdks.git | ||
[submodule "libs"] | ||
path = libs | ||
url = https://github.com/J08nY/javacard-libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: java | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
script: | ||
- ./gradlew check --info | ||
- ./gradlew buildJavaCard --info | ||
- ./gradlew jacocoTestReport | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,96 @@ | ||
apply plugin: 'javacard' | ||
group 'ledger-u2f-javacard' | ||
version '1.0-SNAPSHOT' | ||
|
||
// Buildscript configuration for the javacard-gradle plugin. | ||
// Do not modify this particular block. Dependencies for the project are lower. | ||
buildscript { | ||
repositories { | ||
maven { url 'http://snapshots.marmeladburk.fidesmo.com/' } | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.fidesmo:gradle-javacard:0.2.7-SNAPSHOT' | ||
classpath 'com.klinec:gradle-javacard:1.5.5' | ||
} | ||
} | ||
|
||
apply plugin: 'javacard' | ||
apply plugin: 'jacoco' | ||
sourceCompatibility = 1.7 | ||
|
||
// Common settings, definitions | ||
final def rootPath = rootDir.absolutePath | ||
final def libs = rootPath + '/libs' | ||
final def libsSdk = rootPath + '/libs-sdks' | ||
|
||
// Repositories for your project | ||
repositories { | ||
mavenCentral() | ||
// mavenLocal() // for local maven repository if needed | ||
flatDir { | ||
dirs libs | ||
} | ||
} | ||
|
||
// Dependencies for your project | ||
dependencies { | ||
// testCompile group: 'junit', name: 'junit', version: '4.12' | ||
// testCompile 'org.testng:testng:6.1.1' | ||
|
||
jcardsim 'com.licel:jcardsim:3.0.4' | ||
} | ||
|
||
test { | ||
useTestNG() | ||
jvmArgs '-noverify' | ||
} | ||
|
||
// JavaCard SDKs and libraries | ||
final def JC212 = libsSdk + '/jc212_kit' | ||
final def JC221 = libsSdk + '/jc221_kit' | ||
final def JC222 = libsSdk + '/jc222_kit' | ||
final def JC303 = libsSdk + '/jc303_kit' | ||
final def JC304 = libsSdk + '/jc304_kit' | ||
final def JC305 = libsSdk + '/jc305u1_kit' | ||
|
||
// Which JavaCard SDK to use - select | ||
final def JC_SELECTED = JC304 | ||
|
||
javacard { | ||
|
||
sdkVersion = '3.0.2' | ||
|
||
cap { | ||
aid = '0xa0:0x00:0x00:0x06:0x17:0x00:0x4f:0x97:0xa2:0xe9:0x50:0x01' | ||
packageName = 'com.ledger.u2f' | ||
applet { | ||
aid = '0xa0:0x00:0x00:0x06:0x17:0x00:0x4f:0x97:0xa2:0xe9:0x49:0x01' | ||
className = 'U2FApplet' | ||
} | ||
version = '1.1' | ||
} | ||
//noinspection GroovyAssignabilityCheck | ||
config { | ||
jckit JC_SELECTED | ||
|
||
// JCardSim automatically added by the javacard-gradle plugin | ||
addSurrogateJcardSimRepo true | ||
addImplicitJcardSim true | ||
addImplicitJcardSimJunit true | ||
|
||
//noinspection GroovyAssignabilityCheck | ||
cap { | ||
packageName 'com.ledger.u2f' | ||
version '1.1' | ||
aid '0xa0:0x00:0x00:0x06:0x17:0x00:0x4f:0x97:0xa2:0xe9:0x50:0x01' | ||
output 'ledger-u2f.cap' | ||
|
||
//noinspection GroovyAssignabilityCheck | ||
applet { | ||
className 'U2FApplet' | ||
aid '0xa0:0x00:0x00:0x06:0x17:0x00:0x4f:0x97:0xa2:0xe9:0x49:0x01' | ||
} | ||
|
||
//noinspection GroovyAssignabilityCheck | ||
dependencies { | ||
remote 'fr.bmartel:gplatform:2.1.1' | ||
} | ||
} | ||
} | ||
} | ||
|
||
jacocoTestReport { | ||
reports { | ||
xml.enabled true | ||
html.enabled false | ||
} | ||
} | ||
|
||
check.dependsOn jacocoTestReport |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Wed Aug 13 13:45:49 CEST 2014 | ||
#Sun Dec 10 20:07:32 CET 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip |