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

Commit 87f0394

Browse files
author
Drilon Reçica
committed
Base structure for SecureStorage2 Project
1 parent 2818da1 commit 87f0394

File tree

10 files changed

+537
-0
lines changed

10 files changed

+537
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
!.idea/
5+
.idea/*
6+
!codeStyleSettings.xml
7+
.DS_Store
8+
/build
9+
/captures
10+
.externalNativeBuild

build.gradle

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
ext.versionCode = 1
5+
ext.versionName = '2.0.0'
6+
ext.kotlin_version = '1.2.41'
7+
repositories {
8+
google()
9+
jcenter()
10+
}
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:3.1.3'
13+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
14+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15+
16+
// NOTE: Do not place your application dependencies here; they belong
17+
// in the individual module build.gradle files
18+
}
19+
}
20+
21+
// Plugin used to upload authenticated files to BinTray through Gradle
22+
plugins {
23+
id "com.jfrog.bintray" version "1.7.3"
24+
}
25+
26+
allprojects {
27+
repositories {
28+
google()
29+
jcenter()
30+
}
31+
}
32+
33+
task clean(type: Delete) {
34+
delete rootProject.buildDir
35+
}
36+
37+
task('pV').doLast {
38+
println "${versionName}"
39+
}

config/checkstyle.xml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+
6+
<!--
7+
Checkstyle configuration that checks the Google coding conventions from:
8+
9+
- Google Java Style
10+
https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
11+
12+
Checkstyle is very configurable. Be sure to read the documentation at
13+
http://checkstyle.sf.net (or in your downloaded distribution).
14+
Most Checks are configurable, be sure to consult the documentation.
15+
To completely disable a check, just comment it out or delete it from the file.
16+
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
17+
18+
-->
19+
20+
<module name="Checker">
21+
<property name="charset" value="UTF-8"/>
22+
23+
<property name="severity" value="warning"/>
24+
25+
<!-- Add Support @SuppressWarnings("checkstyle:<module_name>") annotation-->
26+
<module name="SuppressWarningsFilter"/>
27+
28+
<!--Add support CHECKSTYLE:OFF / CHECKSTYLE:ON for suppressing warnings -->
29+
<module name="SuppressionCommentFilter"/>
30+
31+
<module name="TreeWalker">
32+
33+
<!-- Add Support @SuppressWarnings("checkstyle:<module_name>") annotation-->
34+
<module name="SuppressWarningsHolder"/>
35+
36+
<!--Add support CHECKSTYLE:OFF / CHECKSTYLE:ON for suppressing warnings -->
37+
<module name="FileContentsHolder"/>
38+
39+
<module name="OuterTypeFilename"/>
40+
<module name="IllegalTokenText">
41+
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
42+
<property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
43+
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
44+
</module>
45+
<module name="AvoidStarImport"/>
46+
<module name="EmptyBlock">
47+
<property name="option" value="TEXT"/>
48+
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
49+
</module>
50+
<module name="NeedBraces"/>
51+
<module name="LeftCurly"/>
52+
<module name="RightCurly"/>
53+
<module name="MultipleVariableDeclarations"/>
54+
<module name="ArrayTypeStyle"/>
55+
<module name="MissingSwitchDefault"/>
56+
<module name="FallThrough"/>
57+
<module name="UpperEll"/>
58+
<module name="PackageName"/>
59+
<module name="TypeName">
60+
<message key="name.invalidPattern"
61+
value="Type name ''{0}'' must match pattern ''{1}''."/>
62+
</module>
63+
<module name="MemberName">
64+
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
65+
<message key="name.invalidPattern"
66+
value="Member name ''{0}'' must match pattern ''{1}''."/>
67+
</module>
68+
<module name="ParameterName">
69+
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
70+
<message key="name.invalidPattern"
71+
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
72+
</module>
73+
<module name="LocalVariableName">
74+
<property name="tokens" value="VARIABLE_DEF"/>
75+
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
76+
<property name="allowOneCharVarInForLoop" value="true"/>
77+
<message key="name.invalidPattern"
78+
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
79+
</module>
80+
<module name="ClassTypeParameterName"/>
81+
<module name="MethodTypeParameterName">
82+
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
83+
<message key="name.invalidPattern"
84+
value="Method type name ''{0}'' must match pattern ''{1}''."/>
85+
</module>
86+
<module name="NoFinalizer"/>
87+
<module name="GenericWhitespace">
88+
<message key="ws.followed"
89+
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
90+
<message key="ws.preceded"
91+
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
92+
<message key="ws.illegalFollow"
93+
value="GenericWhitespace ''{0}'' should be followed by whitespace."/>
94+
<message key="ws.notPreceded"
95+
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
96+
</module>
97+
<module name="MethodParamPad"/>
98+
<module name="OperatorWrap">
99+
<property name="option" value="NL"/>
100+
<property name="tokens"
101+
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
102+
</module>
103+
<module name="MethodName">
104+
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
105+
<message key="name.invalidPattern"
106+
value="Method name ''{0}'' must match pattern ''{1}''."/>
107+
</module>
108+
<module name="IllegalInstantiation"/>
109+
<module name="ModifiedControlVariable"/>
110+
<module name="SimplifyBooleanExpression"/>
111+
<module name="SimplifyBooleanReturn"/>
112+
<module name="MethodLength"/>
113+
<module name="EmptyLineSeparator">
114+
<property name="tokens" value="PACKAGE_DEF, IMPORT, ENUM_DEF, INTERFACE_DEF, CTOR_DEF, STATIC_INIT, INSTANCE_INIT"/>
115+
</module>
116+
<module name="NoWhitespaceAfter"/>
117+
<module name="NoWhitespaceBefore"/>
118+
<module name="WhitespaceAfter"/>
119+
<module name="WhitespaceAround"/>
120+
</module>
121+
122+
<module name="Translation"/>
123+
<module name="RegexpSingleline">
124+
<property name="format" value="System\.out\.print"/>
125+
<property name="message" value="System.out.print* is not allowed. Use logging instead."/>
126+
</module>
127+
<module name="RegexpSingleline">
128+
<property name="format" value="System\.exit"/>
129+
<property name="message" value="System.exit is not allowed."/>
130+
</module>
131+
<module name="RegexpSingleline">
132+
<property name="format" value="printStacktrace"/>
133+
<property name="message" value="printStacktrace is not allowed. Use logging instead or handle error correctly."/>
134+
</module>
135+
</module>

config/pmd.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0"?>
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
name="Android Application Rules"
4+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
5+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
6+
7+
<description>Custom rule set for Conrad Android applications</description>
8+
9+
<exclude-pattern>.*/R.java</exclude-pattern>
10+
<exclude-pattern>.*/gen/.*</exclude-pattern>
11+
<exclude-pattern>.*/model/.*</exclude-pattern>
12+
13+
<rule ref="rulesets/java/android.xml"/>
14+
<rule ref="rulesets/java/basic.xml"/>
15+
<rule ref="rulesets/java/braces.xml"/>
16+
<rule ref="rulesets/java/clone.xml"/>
17+
<rule ref="rulesets/java/codesize.xml">
18+
<exclude name="TooManyFields"/>
19+
<exclude name="TooManyMethods"/>
20+
<exclude name="CyclomaticComplexity"/>
21+
<exclude name="StdCyclomaticComplexity"/>
22+
<exclude name="ModifiedCyclomaticComplexity"/>
23+
<exclude name="NPathComplexity"/>
24+
<exclude name="ExcessiveMethodLength"/> <!-- already checked by checkstyle -->
25+
<exclude name="ExcessiveParameterList"/> <!-- already checked by checkstyle -->
26+
</rule>
27+
<rule ref="rulesets/java/controversial.xml">
28+
<exclude name="OnlyOneReturn"/>
29+
<exclude name="AtLeastOneConstructor"/>
30+
<exclude name="AvoidFinalLocalVariable"/>
31+
<exclude name="AvoidAccessibilityAlteration"/>
32+
<exclude name="NullAssignment"/>
33+
<exclude name="CallSuperInConstructor"/>
34+
<exclude name="DataflowAnomalyAnalysis"/>
35+
<exclude name="DefaultPackage"/>
36+
<exclude name="AvoidLiteralsInIfCondition"/>
37+
<exclude name="AvoidPrefixingMethodParameters"/>
38+
<exclude name="UseConcurrentHashMap"/>
39+
</rule>
40+
<rule ref="rulesets/java/design.xml">
41+
<exclude name="GodClass"/>
42+
<exclude name="ConfusingTernary"/>
43+
<exclude name="UncommentedEmptyConstructor"/>
44+
<exclude name="UseLocaleWithCaseConversions"/>
45+
<exclude name="AvoidDeeplyNestedIfStmts"/>
46+
<exclude name="UncommentedEmptyMethodBody"/>
47+
<exclude name="EmptyMethodInAbstractClassShouldBeAbstract"/>
48+
<exclude name="FieldDeclarationsShouldBeAtStartOfClass"/>
49+
<exclude name="AvoidReassigningParameters"/>
50+
<exclude name="AvoidSynchronizedAtMethodLevel"/>
51+
<exclude name="DefaultLabelNotLastInSwitchStmt"/>
52+
</rule>
53+
<rule ref="rulesets/java/imports.xml">
54+
<exclude name="TooManyStaticImports"/>
55+
</rule>
56+
<rule ref="rulesets/java/logging-java.xml"/>
57+
<rule ref="rulesets/java/naming.xml">
58+
<exclude name="ShortClassName"/>
59+
<exclude name="ShortVariable"/>
60+
<exclude name="LongVariable"/>
61+
<exclude name="GenericsNaming"/>
62+
<exclude name="AbstractNaming"/>
63+
</rule>
64+
<rule ref="rulesets/java/optimizations.xml">
65+
<exclude name="AvoidInstantiatingObjectsInLoops"/>
66+
<exclude name="LocalVariableCouldBeFinal"/>
67+
<exclude name="MethodArgumentCouldBeFinal"/>
68+
<exclude name="SimplifyStartsWith"/>
69+
<exclude name="UseStringBufferForStringAppends"/>
70+
<exclude name="PrematureDeclaration"/>
71+
</rule>
72+
<rule ref="rulesets/java/strings.xml"/>
73+
<rule ref="rulesets/java/typeresolution.xml"/>
74+
<rule ref="rulesets/java/unnecessary.xml">
75+
<exclude name="UselessOverridingMethod"/>
76+
</rule>
77+
</ruleset>

gradle.properties

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx1536m
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. More details, visit
12+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13+
# org.gradle.parallel=true

gradle/wrapper/gradle-wrapper.jar

53.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Mon Jun 11 11:23:44 CEST 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)