Skip to content

Commit

Permalink
Feat: Config for spotless header check
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfmem committed Feb 4, 2020
1 parent 0259f8c commit 1344801
Show file tree
Hide file tree
Showing 21 changed files with 195 additions and 39 deletions.
42 changes: 40 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ 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 @@ -43,10 +45,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
25 changes: 0 additions & 25 deletions android/keyple-plugin/android-omapi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.jetbrains.dokka'
apply plugin: "com.diffplug.gradle.spotless"

def version = "0.9.0"

Expand Down Expand Up @@ -51,11 +49,6 @@ android {
abortOnError false
}

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

//generate output aar with a qualified name : with version number
libraryVariants.all { variant ->
variant.outputs.all { output ->
Expand Down Expand Up @@ -105,17 +98,6 @@ android {

}

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
}

//build sources jar
task androidSourcesJar(type: Jar) {
classifier = 'sources'
Expand Down Expand Up @@ -244,10 +226,3 @@ dependencies {
/** Mockk**/
testImplementation "io.mockk:mockk:1.9"
}

spotless {
kotlin {
target "**/*.kt"
ktlint()
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2019 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -8,7 +8,7 @@
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2019 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -8,7 +8,7 @@
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2019 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -8,7 +8,7 @@
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

import java.util.HashMap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2018 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -8,7 +8,7 @@
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

internal interface ISeServiceFactory<T, V> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.se

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.se

import android.se.omapi.Channel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.se

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.simalliance

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2018 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -8,7 +8,7 @@
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.simalliance

import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2018 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -8,7 +8,7 @@
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.simalliance

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi

import io.mockk.MockKAnnotations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.se

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.se

import android.se.omapi.Channel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.se

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.simalliance

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
*
* This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
package org.eclipse.keyple.plugin.android.omapi.simalliance

import io.mockk.every
Expand Down

0 comments on commit 1344801

Please sign in to comment.