Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Conflicts:
	opfpush-providers/adm/build.gradle
	opfpush-providers/gcm/build.gradle
	opfpush-providers/nokia/build.gradle
	opfpush/build.gradle
	samples/opfpush-sample/build.gradle
  • Loading branch information
Roman Savin committed Mar 6, 2015
2 parents 1fdb4af + fc045b2 commit 4a4a2f8
Show file tree
Hide file tree
Showing 38 changed files with 526 additions and 226 deletions.
99 changes: 0 additions & 99 deletions .idea/analyzers/pmd/ruleset.xml

This file was deleted.

4 changes: 2 additions & 2 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ buildscript {
//noinspection GradleDependency
classpath 'com.android.tools.build:gradle:1.1.2'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
classpath 'com.noveogroup.android:check:1.1.2'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@
<property name="severity" value="info" />
</module>

<module name="SuppressWarningsFilter" />
<module name="TreeWalker">

<!--Necessary for SuppressionCommentFilter-->
<module name="FileContentsHolder"/>
<module name="SuppressWarningsHolder" />

<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
Expand Down Expand Up @@ -77,6 +82,8 @@
<module name="IllegalImport" />
<!-- defaults to sun.* packages -->
<module name="RedundantImport" />
<module name="UnusedImports" />


<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
Expand All @@ -88,7 +95,10 @@
<property name="severity" value="info" />
</module>
<module name="MethodLength" />
<module name="ParameterNumber" />
<module name="ParameterNumber">
<!--<property name="id" value="maxParameterNumber"/>-->
<property name="max" value="7"/>
</module>


<!-- Checks for whitespace -->
Expand Down Expand Up @@ -125,8 +135,15 @@
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="EmptyStatement" />
<module name="EqualsHashCode" />
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true" />
<property name="ignoreSetter" value="true" />
<property name="severity" value="ignore" />
</module>
<module name="IllegalInstantiation" />
<module name="InnerAssignment" />
<module name="InnerAssignment" >
<property name="severity" value="ignore" />
</module>
<module name="MagicNumber">
<property name="severity" value="info" />
<property name="ignoreNumbers" value="-1, 0, 1, 2, 10, 60, 100, 256, 1000" />
Expand All @@ -148,7 +165,9 @@
<module name="FinalClass" />
<module name="HideUtilityClassConstructor" />
<module name="InterfaceIsType" />
<module name="VisibilityModifier" />
<module name="VisibilityModifier" >
<property name="protectedAllowed" value="true"/>
</module>


<!-- Miscellaneous other checks. -->
Expand All @@ -164,10 +183,8 @@
</module>
<module name="UpperEll" />

<module name="FileContentsHolder"/>
</module>

<!-- Enable suppression comments -->
<module name="SuppressionCommentFilter"/>

</module>
116 changes: 116 additions & 0 deletions config/pmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<ruleset name="ruleset" xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">

<description>POM rule set file</description>

<rule ref="rulesets/java/android.xml"/>

<rule ref="rulesets/java/basic.xml"/>

<rule ref="rulesets/java/braces.xml"/>

<rule ref="rulesets/java/clone.xml"/>

<rule ref="rulesets/java/codesize.xml"/>
<rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
<properties>
<property name="reportLevel" value="20"/>
</properties>
</rule>
<rule ref="rulesets/java/codesize.xml/TooManyMethods">
<properties>
<property name="maxmethods" value="25"/>
</properties>
</rule>

<rule ref="rulesets/java/comments.xml">
<exclude name="CommentRequired"/>
<exclude name="CommentSize"/>
</rule>
<!--<rule ref="rulesets/java/comments.xml/CommentSize">-->
<!--<properties>-->
<!--<property name="violationSuppressRegex" value="/\*\n[\s*]*Copyright(?s).*" />-->
<!--</properties>-->
<!--</rule>-->

<rule ref="rulesets/java/controversial.xml">
<!-- while ((x = update()) != null) { process(x); } -->
<exclude name="AssignmentInOperand"/>
<exclude name="AtLeastOneConstructor"/>
<exclude name="AvoidFinalLocalVariable"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="AvoidPrefixingMethodParameters"/>
<exclude name="AvoidUsingVolatile"/>
<exclude name="DataflowAnomalyAnalysis"/>
<exclude name="DefaultPackage"/>
<exclude name="NullAssignment"/>
<exclude name="OnlyOneReturn"/>
<exclude name="UseConcurrentHashMap"/>
</rule>

<rule ref="rulesets/java/coupling.xml">
<exclude name="ExcessiveImports"/>
<exclude name="LawOfDemeter"/>
</rule>

<rule ref="rulesets/java/design.xml">
<exclude name="AvoidReassigningParameters"/>
<!-- if (x != y) { short code block } else { long code block } -->
<exclude name="ConfusingTernary"/>
<exclude name="FieldDeclarationsShouldBeAtStartOfClass"/>
<exclude name="SwitchStmtsShouldHaveDefault"/>
<!-- Android listeners contain a lot of such switch statements -->
<exclude name="TooFewBranchesForASwitchStatement"/>
</rule>

<rule ref="rulesets/java/empty.xml"/>

<rule ref="rulesets/java/finalizers.xml"/>

<rule ref="rulesets/java/imports.xml">
<exclude name="TooManyStaticImports"/>
</rule>

<!--<rule ref="rulesets/java/junit.xml"/>-->

<rule ref="rulesets/java/logging-jakarta-commons.xml">
<exclude name="GuardLogStatement"/>
</rule>

<rule ref="rulesets/java/logging-java.xml">
<exclude name="GuardLogStatementJavaUtil"/>
</rule>

<rule ref="rulesets/java/migrating.xml"/>

<rule ref="rulesets/java/naming.xml">
<exclude name="AbstractNaming"/>
<exclude name="AvoidFieldNameMatchingMethodName"/>
<exclude name="LongVariable"/>
<exclude name="ShortClassName"/>
<exclude name="ShortVariable"/>
</rule>

<rule ref="rulesets/java/optimizations.xml">
<exclude name="AvoidInstantiatingObjectsInLoops"/>
<exclude name="LocalVariableCouldBeFinal"/>
<exclude name="MethodArgumentCouldBeFinal"/>
</rule>

<rule ref="rulesets/java/strictexception.xml"/>

<rule ref="rulesets/java/strings.xml"/>

<rule ref="rulesets/java/typeresolution.xml">
<exclude name="LooseCoupling"/>
</rule>

<rule ref="rulesets/java/unnecessary.xml"/>

<rule ref="rulesets/java/unusedcode.xml"/>

</ruleset>
26 changes: 20 additions & 6 deletions opfpush-providers/adm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'
apply plugin: 'com.noveogroup.android.check'
apply from: 'https://raw.githubusercontent.com/onepf/OPF-mvn-repo/master/OPF-mvn-push.gradle'

android {
Expand All @@ -25,8 +26,7 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 21
versionCode 4
versionName "0.1.4"
versionName "0.1.5-SNAPSHOT"
}

lintOptions {
Expand All @@ -41,15 +41,29 @@ android {
}
}

check {
abortOnError false

checkstyle {
config rootProject.file('config/checkstyle.xml')
}

pmd {
config rootProject.file('config/pmd.xml')
}
}

dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:2.4'
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.robolectric:robolectric:2.4'

//noinspection NewerVersionAvailable
compile('org.onepf:opfpush:0.1.4@aar') {
transitive = true
}
compile 'org.onepf:opfpush:0.1.5-SNAPSHOT@aar'
provided 'com.amazon:amazon-device-messaging:1.0.1'
provided 'com.android.support:support-annotations:19.1.0'
provided 'com.google.code.findbugs:annotations:3.0.0'
//noinspection NewerVersionAvailable
provided 'org.onepf:opfutils:0.1.15-SNAPSHOT'
}
2 changes: 1 addition & 1 deletion opfpush-providers/adm/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

POM_NAME = Amazon Device Messaging OPFPush provider
POM_ARTIFACT_ID = opfpush-adm
POM_DESCRIPTION = Amazon Device Messaging push provider implementation fo OPFPush library
POM_DESCRIPTION = Amazon Device Messaging push provider implementation for OPFPush library
POM_PACKAGING = aar
POM_SCM_URL = https://github.com/onepf/OPFPush.git
POM_SCM_CONNECTION = scm:git@github.com:onepf/OPFPush.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public final class ADMConstants {
static final String KINDLE_STORE_APP_PACKAGE = "com.amazon.venezia";
static final String ACCOUNT_TYPE = "com.amazon.account";

static final String RECEIVE_MESSAGE_PERMISSION_SUFFIX = ".permission.RECEIVE_ADM_MESSAGE";

private ADMConstants() {
throw new UnsupportedOperationException();
}
Expand Down
Loading

0 comments on commit 4a4a2f8

Please sign in to comment.