Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f40bcca

Browse files
authored
Merge pull request #11 from adorsys/develop
SecureStorage2 version 0.0.1 PR
2 parents 87f0394 + 7c4b3b9 commit f40bcca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2202
-1
lines changed

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: android
2+
sudo: required
3+
dist: trusty
4+
jdk: oraclejdk8
5+
6+
branches:
7+
only:
8+
- master
9+
- develop
10+
before_cache:
11+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
12+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
13+
cache:
14+
directories:
15+
- $HOME/.gradle/caches/
16+
- $HOME/.gradle/wrapper/
17+
env:
18+
global:
19+
- ANDROID_API=27
20+
- ANDROID_BUILD_TOOLS=27.0.3
21+
android:
22+
components:
23+
- tools
24+
- platform-tools
25+
- build-tools-$ANDROID_BUILD_TOOLS
26+
- android-$ANDROID_API
27+
- extra-google-m2repository
28+
- extra-android-m2repository # for design library
29+
- addon-google_apis-google-19 # google play services
30+
licenses:
31+
- android-sdk-preview-license-.+
32+
- android-sdk-license-.+
33+
- google-gdk-license-.+
34+
script:
35+
- ./code-check.sh
36+
after_success:
37+
- ./bintray-upload.sh

bintray-upload.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
if [ "$TRAVIS_BRANCH" == "master" ]; then
4+
echo -e "\033[0;32m Start clean module \033[0m"
5+
./gradlew :securestorage2library:clean
6+
echo -e "Finished clean \033[0m"
7+
8+
echo -e "\033[0;32m Start install module \033[0m"
9+
./gradlew :securestorage2library:install
10+
echo -e "\033[0;32m Finished install \033[0m"
11+
12+
echo -e "\033[0;32m Start bintrayUpload \033[0m"
13+
./gradlew :securestorage2library:bintrayUpload
14+
echo -e "\033[0;32m Finished bintrayUpload \033[0m"
15+
else
16+
echo -e "\033[0;32m Current branch is not master, will not upload to bintray. \033[0m"
17+
fi

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
buildscript {
44
ext.versionCode = 1
5-
ext.versionName = '2.0.0'
5+
ext.versionName = '0.0.1'
66
ext.kotlin_version = '1.2.41'
77
repositories {
88
google()

code-check.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
echo -e "\033[0;32mStart normal check \033[0m"
4+
./gradlew check
5+
echo -e "\033[0;32m Finished normal check \033[0m"
6+
7+
echo -e "\033[0;32m Start checkstyle check \033[0m"
8+
./gradlew checkstyle
9+
echo -e "\033[0;32m Finished checkstyle check \033[0m"
10+
11+
echo -e "\033[0;32m Start ktlint check \033[0m"
12+
./gradlew ktlint
13+
echo -e "\033[0;32m Finished ktlint check \033[0m"

securestorage2library/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

securestorage2library/build.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'com.github.dcendents.android-maven'
4+
5+
// Apply static code analysis configuration
6+
apply from: './checks.gradle'
7+
8+
repositories {
9+
mavenCentral()
10+
jcenter()
11+
}
12+
13+
android {
14+
compileSdkVersion 27
15+
buildToolsVersion "27.0.3"
16+
17+
defaultConfig {
18+
minSdkVersion 18
19+
targetSdkVersion 27
20+
versionCode versionCode
21+
versionName "${versionName}"
22+
}
23+
24+
buildTypes {
25+
release {
26+
minifyEnabled true
27+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28+
}
29+
}
30+
31+
lintOptions {
32+
disable 'UnusedResources', 'GoogleAppIndexingWarning'
33+
}
34+
}
35+
36+
dependencies {
37+
implementation fileTree(dir: 'libs', include: ['*.jar'])
38+
implementation 'com.android.support:appcompat-v7:27.1.1'
39+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
40+
ktlint "com.github.shyiko:ktlint:0.24.0"
41+
}
42+
43+
ext {
44+
bintrayRepo = 'adorsys'
45+
bintrayName = 'securestorage2'
46+
47+
publishedGroupId = 'de.adorsys.android'
48+
libraryName = 'securestorage2'
49+
artifact = 'securestorage2'
50+
51+
libraryDescription = 'securestorage2'
52+
53+
siteUrl = 'https://www.adorsys.de/'
54+
gitUrl = 'https://github.com/adorsys/secure-storage2-android.git'
55+
56+
libraryVersion = "${versionName}"
57+
58+
developerId = 'andev'
59+
developerName = 'Andev Adorsys'
60+
developerEmail = 'adorsys.andev@gmail.com'
61+
62+
licenseName = 'The Apache Software License, Version 2.0'
63+
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
64+
allLicenses = ["Apache-2.0"]
65+
}
66+
67+
apply from: 'https://raw.githubusercontent.com/adorsys/jcenter-distribution/master/installv.gradle'
68+
apply from: 'https://raw.githubusercontent.com/adorsys/jcenter-distribution/master/bintrayv.gradle'
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apply plugin: 'checkstyle'
2+
apply plugin: 'pmd'
3+
4+
configurations {
5+
ktlint
6+
}
7+
8+
check.dependsOn('assembleDebug', 'checkstyle', 'pmd', 'lint', 'ktlint', 'ktlintFormat')
9+
10+
task checkstyle(type: Checkstyle) {
11+
ignoreFailures true
12+
configFile file("${project.rootDir}/config/checkstyle.xml")
13+
source 'src'
14+
include '**/*.java'
15+
exclude '**/gen/**'
16+
17+
classpath = files()
18+
}
19+
20+
task pmd(type: Pmd) {
21+
ignoreFailures true
22+
ruleSetFiles = files("${project.rootDir}/config/pmd.xml")
23+
ruleSets = ["java-basic", "java-braces", "java-strings"]
24+
25+
source 'src'
26+
include '**/*.java'
27+
exclude '**/gen/**'
28+
29+
reports {
30+
xml.enabled true
31+
html.enabled true
32+
}
33+
}
34+
35+
task ktlint(type: JavaExec, group: "verification") {
36+
description = "Check Kotlin code style."
37+
classpath = configurations.ktlint
38+
main = "com.github.shyiko.ktlint.Main"
39+
args "src/**/*.kt"
40+
// to generate report in checkstyle format prepend following args:
41+
// "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
42+
// see https://github.com/shyiko/ktlint#usage for more
43+
}
44+
45+
task ktlintFormat(type: JavaExec, group: "formatting") {
46+
description = "Fix Kotlin code style deviations."
47+
classpath = configurations.ktlint
48+
main = "com.github.shyiko.ktlint.Main"
49+
args "-F", "src/**/*.kt"
50+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
-keepclasseswithmembers class de.adorsys.android.securestorage2library.SecureStorage {
23+
static <fields>;
24+
static <methods>;
25+
}
26+
27+
-keep class de.adorsys.android.securestorage2library.internal.SecureStorageException** {
28+
**[] $VALUES;
29+
public *;
30+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="de.adorsys.android.securestorage2library">
3+
4+
<application
5+
android:allowBackup="false"
6+
android:label="@string/app_name">
7+
<provider
8+
android:name=".internal.SecureStorageProvider"
9+
android:authorities="${applicationId}.de.adorsys.android.securestorage2library"
10+
android:enabled="true"
11+
android:exported="false" />
12+
</application>
13+
14+
</manifest>

0 commit comments

Comments
 (0)