Skip to content

Commit

Permalink
Clean up / update build
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Skjølberg committed Feb 6, 2020
1 parent 5870a78 commit 59a2f42
Show file tree
Hide file tree
Showing 426 changed files with 12,130 additions and 58 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions externalNFCAPI/build.gradle → api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 19
buildToolsVersion "28.0.3"
compileSdkVersion 28
buildToolsVersion "29.0.3"

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}

Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions externalNFCCore/build.gradle → core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 19
buildToolsVersion '28.0.3'
compileSdkVersion 28
buildToolsVersion '29.0.3'

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 15
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand All @@ -22,10 +22,10 @@ android {
}

dependencies {
api project(':externalNFCTools')
compileOnly files('../libs/acssmc-1.1.3.jar')
api project(':tools')
compileOnly files('../libs/acssmc-1.1.5.jar')
compileOnly files('../libs/classes-dex2jar.jar')
compileOnly files('../libs/acsbt-1.0.0preview9.jar')
compileOnly files('../libs/acsbt-1.0.1.aar')

// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.12'
Expand All @@ -34,14 +34,14 @@ dependencies {
}

task clearJar(type: Delete) {
delete 'build/outputs/ExternalNFCCore.jar'
delete 'build/outputs/core.jar'
}

task makeJar(type: Copy) {
from('build/intermediates/bundles/library/')
into('build/outputs/')
include('classes.jar')
rename ('classes.jar', 'ExternalNFCCore.jar')
rename ('classes.jar', 'core.jar')
}

makeJar.dependsOn(clearJar, build)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ protected Exception doInBackground(UsbDevice... params) {

binder.setReaderTechnology(new ACRReaderTechnology(reader));

/*
//byte[] enterInitiatorMode = reader.transmit(0, new byte[]{(byte)0xE0, (byte)0, (byte)0, 0x40, 0x03, 0x01, 0x02, 0x02});
byte[] enterInitiatorMode = reader.control(0, Reader.IOCTL_CCID_ESCAPE, new byte[]{(byte)0xE0, (byte)0, (byte)0, 0x40, 0x03, 0x01, 0x00, 0x00});
Log.d(TAG, "enterInitiatorMode " + ACRCommands.toHexString(enterInitiatorMode));
byte[] mifareUltralightUID = reader.control(0, Reader.IOCTL_CCID_ESCAPE, new byte[]{(byte)0xE0, (byte)0, (byte)0, 0x61, 0x07, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07});
Log.d(TAG, "mifareUltralightUID " + ACRCommands.toHexString(mifareUltralightUID));
byte[] mifareUltralightData = reader.control(0, Reader.IOCTL_CCID_ESCAPE, new byte[]{(byte)0xE0, (byte)0, (byte)0, 0x60, 20, 0x01, 0x01, 0x00, 16, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25});
Log.d(TAG, "mifareUltralightData" + ACRCommands.toHexString(mifareUltralightData));
*/

nfcReaderServiceListener.onReaderOpen(reader, NfcReader.READER_STATUS_OK);

synchronized (AbstractBackgroundUsbService.this) {
Expand Down Expand Up @@ -427,6 +440,7 @@ protected void initialize() {

// Initialize reader
reader = new ReaderWrapper(mManager);

reader.setOnStateChangeListener(new OnStateChangeListener() {

@Override
Expand Down Expand Up @@ -457,6 +471,7 @@ public void onStateChange(int slot, int prevState, int currState) {
}
});


// Register receiver for USB permission
mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);

Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions externalNFCClient/build.gradle → examples/client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "28.0.3"
compileSdkVersion 28
buildToolsVersion "29.0.3"

lintOptions {
abortOnError false
}

defaultConfig {
applicationId "com.skjolberg.nfc.external.client"
minSdkVersion 14
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand All @@ -23,6 +23,6 @@ android {
}

dependencies {
api project(':externalNFCAPI')
api project(':core')
api 'com.google.code.ndef-tools-for-android:ndeftools:1.2.4'
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "28.0.3"
compileSdkVersion 28
buildToolsVersion "29.0.3"

lintOptions {
abortOnError false
Expand All @@ -11,7 +11,7 @@ android {
defaultConfig {
applicationId "com.skjolberg.nfc.external.hceclient"
minSdkVersion 19
targetSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "28.0.3"
compileSdkVersion 28
buildToolsVersion "29.0.3"

lintOptions {
abortOnError false
}

defaultConfig {
applicationId "com.skjolberg.nfc.external.nxpclient"
minSdkVersion 16
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand All @@ -23,6 +23,6 @@ android {
}

dependencies {
api project(':externalNFCAPI')
api project(':api')
api files('libs/nxpnfcliblite.jar')
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions externalNFCService/build.gradle → examples/server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "28.0.3"
compileSdkVersion 28
buildToolsVersion "29.0.3"

lintOptions {
abortOnError false
}

defaultConfig {
applicationId "com.github.skjolber.nfc.external"
minSdkVersion 15
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}
buildTypes {
release {
Expand All @@ -22,9 +22,9 @@ android {
}

dependencies {
compileOnly files('../libs/acssmc-1.1.3.jar')
compileOnly files('../libs/acsbt-1.0.0preview9.jar')
api project(':externalNFCAPI')
api project(':externalNFCCore')
api project(':externalNFCTools')
implementation files('../../libs/acssmc-1.1.5.jar')
implementation files('../../libs/acsbt-1.0.1.aar')
api project(':api')
api project(':core')
api project(':tools')
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "28.0.3"
compileSdkVersion 28
buildToolsVersion "29.0.3"

lintOptions {
abortOnError false
}

defaultConfig {
applicationId "com.skjolberg.nfc.external.kiosk"
minSdkVersion 14
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand All @@ -27,5 +27,5 @@ repositories {
}

dependencies {
api project(':externalNFCAPI')
api project(':api')
}
Binary file added libs/acsbt-1.0.1.aar
Binary file not shown.
Binary file removed libs/acssmc-1.1.3.jar
Binary file not shown.
Binary file added libs/acssmc-1.1.5.jar
Binary file not shown.
17 changes: 9 additions & 8 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
include ':externalNFCAPI'
include ':externalNFCClient'
include ':externalNFCHostCardEmulationClient'
include ':externalNFCWebKiosk'
include ':externalNFCNxpClient'
include ':wrapper'
include ':api'
include ':tools'
include ':core'

include ':externalNFCTools'
include ':externalNFCCore'
include ':externalNFCService'
include ':examples:client'
include ':examples:hostCardEmulationClient'
include ':examples:webKiosk'
include ':examples:nxpClient'
include ':examples:server'

16 changes: 8 additions & 8 deletions externalNFCTools/build.gradle → tools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ repositories {
}

android {
compileSdkVersion 19
buildToolsVersion '28.0.3'
compileSdkVersion 28
buildToolsVersion '29.0.3'

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 15
targetSdkVersion 19
minSdkVersion 19
targetSdkVersion 28
}

buildTypes {
Expand All @@ -27,21 +27,21 @@ android {
}

dependencies {
compileOnly files('../libs/acssmc-1.1.3.jar')
compileOnly files('../libs/acssmc-1.1.5.jar')
compileOnly files('../libs/classes-dex2jar.jar')
api project(':externalNFCAPI')
api project(':api')
api 'com.google.code.ndef-tools-for-android:ndeftools:1.2.4'
}

task clearJar(type: Delete) {
delete 'build/outputs/NFCToolsForJavaAndroid.jar'
delete 'build/outputs/tools.jar'
}

task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('build/outputs/')
include('classes.jar')
rename ('classes.jar', 'NFCToolsForJavaAndroid.jar')
rename ('classes.jar', 'tools.jar')
}

makeJar.dependsOn(clearJar, build)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class ReaderWrapper {

public static final boolean LOG = false;
public static final boolean LOG = true;

public static final String[] stateStrings = {"Unknown", "Absent", "Present", "Swallowed", "Powered", "Negotiable", "Specific"};

Expand Down
Loading

0 comments on commit 59a2f42

Please sign in to comment.