Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

feat/omapi_plugin_update #263

Merged
merged 7 commits into from
Feb 18, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 18 additions & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The project maintains the following source code repositories:
* Olivier Delcroix - plugins Android, plugin Remote SE
* Florent Clairambault - Keyple Core
* Paulo Barreto - integration and demo
* Meddy Menzikoff - Android plugins and Examples


## Third-party Content
Expand All @@ -66,10 +67,26 @@ Junit (4.12)

####Specific for Android plugins

SEEK for Android (plugin OMAPI)
SEEK for Android (plugin OMAPI) (3.2):

* License: Apache Software License, 2.0

Android Open Source Project

* License: Apache Software License, 2.0

Timber (4.7.1):

* Licence: Apache Software License, 2.0

Mockk (1.9):

* Licence: Apache Software License, 2.0

Kotlin Standard Library (1.3.50):

* Licence: Apache Software License, 2.0

Kotlinx Coroutines core (1.3.3):

* Licence: Apache Software License, 2.0
7 changes: 7 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ Releases:
### keyple-java-plugin-remotese 0.9a
### keyple-android-plugin-android-nfc 0.9a
### keyple-android-plugin-android-omapi 0.9a
* Conversion of the Java code to Kotlin
* Removal of Supports Library usage
* OMAPI compliance improvement to the SIM Alliance
* OMAPI implementation and to the Android 9.0 native OMAPI implementation.
* OMAPI Plugin may now support NEXT instruction on SimAlliance OMAPI 3+
* Updated versions of Android sdk support and dependencies
* Various improvements of OMAP's example application

## Keyple Java 20/01

Expand Down
56 changes: 45 additions & 11 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
mavenLocal()
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.14.0"
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.27.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.10.0"
}
}


ext {
timestamp = new Date().format('yyyyMMdd')
}






subprojects {
allprojects {

group 'org.eclipse.keyple'
apply plugin: 'pmd'

apply plugin: 'org.jetbrains.dokka'
apply plugin: "com.diffplug.gradle.spotless"

repositories {
mavenLocal()
Expand All @@ -46,10 +44,46 @@ subprojects {
"java-braces",
]
}

}

subprojects{

dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
}

spotless {
kotlin {
target "**/*.kt"
ktlint()

// also supports license headers
licenseHeader '/********************************************************************************\n' +
' * Copyright (c) $YEAR Calypso Networks Association https://www.calypsonet-asso.org/\n' +
' *\n' +
' * See the NOTICE file(s) distributed with this work for additional information regarding copyright\n' +
' * ownership.\n' +
' *\n' +
' * This program and the accompanying materials are made available under the terms of the Eclipse\n' +
' * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0\n' +
' *\n' +
' * SPDX-License-Identifier: EPL-2.0\n' +
' ********************************************************************************/'
}
}
}

task javadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = dokka.outputDirectory
inputs.dir 'src/main/kotlin'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from dokka.outputDirectory
}

//create task for to agragate javadoc
/*
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
74 changes: 26 additions & 48 deletions android/keyple-plugin/android-omapi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
apply from: "../../build.gradle"

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

def version = "0.9.0"

if(project.getProperties().containsKey("release") && release=="true"){
Expand All @@ -6,29 +13,20 @@ if(project.getProperties().containsKey("release") && release=="true"){
project.version = version+'-'+ timestamp+ '-SNAPSHOT'
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
archivesBaseName = "keyple-android-plugin-omapi"

group 'org.eclipse.keyple'
project.description = 'Keyple Plugin Android OMAPI'

pmd {
ruleSets = [
"java-basic",
"java-braces",
]
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.3'
compileSdkVersion 29
buildToolsVersion "29.0.2"

defaultConfig {
minSdkVersion 19
targetSdkVersion 21
targetSdkVersion 29
versionName project.version
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand Down Expand Up @@ -93,21 +91,11 @@ android {

}

}


//build javadoc
task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

//build sources jar
Expand Down Expand Up @@ -217,34 +205,24 @@ task installPlugin{
}

dependencies {
implementation fileTree(include: ['*.jar'], exclude: ['org.simalliance.openmobileapi.jar'], dir: 'libs')
//simalliance omapi definition
compileOnly files('libs/org.simalliance.openmobileapi.jar')

//Kotlin
implementation 'androidx.core:core-ktx:1.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

//keyple-core project
implementation group: 'org.eclipse.keyple', name: 'keyple-java-core', version: project.version

//android
implementation "com.android.support:support-v4:${android_support_version}"
implementation "com.android.support:appcompat-v7:${android_support_version}"

//logging
implementation "org.slf4j:slf4j-api:${slf4japi_version}"

//omapi definition
compileOnly files('libs/org.simalliance.openmobileapi.jar')
/*
Tests
*
implementation "org.slf4j:slf4j-api:1.7.25" //java
implementation 'com.jakewharton.timber:timber:4.7.1' //Android

/** Test **/
testImplementation "junit:junit:4.12"
testImplementation files('libs/org.simalliance.openmobileapi.jar')

/**Power mock**/
androidTestImplementation "org.mockito:mockito-android:${mockito_android_version}"
androidTestImplementation "org.powermock:powermock-api-mockito:${powermock_version}"
androidTestImplementation "org.powermock:powermock-module-junit4:${powermock_version}"

testImplementation "junit:junit:${junit_version}"
testImplementation "org.powermock:powermock-api-mockito:${powermock_version}"
testImplementation "org.powermock:powermock-module-junit4:${powermock_version}"
/**End of power mock **/
/** Mocking for tests **/
testImplementation "io.mockk:mockk:1.9"
}

This file was deleted.