Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 68d4338

Browse filesBrowse files
committed
Merge branch 'develop'
2 parents b47b322 + 387f909 commit 68d4338
Copy full SHA for 68d4338

Some content is hidden

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

54 files changed

+4826
-11
lines changed

‎.travis.yml

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: android
2+
jdk: oraclejdk8
3+
4+
cache:
5+
directories:
6+
- .autoconf
7+
- $HOME/.m2
8+
9+
android:
10+
components:
11+
- tools
12+
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943
13+
- platform-tools
14+
- build-tools-24.0.3
15+
- android-24
16+
- extra-android-m2repository
17+
18+
script: ./gradlew clean check test install

‎build.gradle

Copy file name to clipboardExpand all lines: build.gradle
+61-1Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ buildscript {
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:2.2.3'
11+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
12+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
13+
classpath "com.tencent.tinker:tinker-patch-gradle-plugin:${TINKER_VERSION}"
1114
}
1215
}
1316

@@ -16,4 +19,61 @@ allprojects {
1619
//mavenLocal()
1720
jcenter()
1821
}
19-
}
22+
}
23+
// See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html.
24+
if (JavaVersion.current().isJava8Compatible()) {
25+
allprojects {
26+
tasks.withType(Javadoc) {
27+
options.addStringOption('Xdoclint:none', '-quiet')
28+
}
29+
}
30+
}
31+
32+
subprojects {
33+
tasks.withType(JavaCompile) {
34+
sourceCompatibility = JavaVersion.VERSION_1_7
35+
targetCompatibility = JavaVersion.VERSION_1_7
36+
}
37+
}
38+
39+
subprojects { project ->
40+
if (project.name.contains("sample") || project.name.contains("example")) { return; }
41+
repositories {
42+
jcenter()
43+
}
44+
apply plugin: 'checkstyle'
45+
46+
checkstyle {
47+
toolVersion = '6.12.1'
48+
}
49+
50+
checkstyle {
51+
configFile = rootProject.file('checkstyle.xml')
52+
configProperties.checkStyleConfigDir = rootProject.rootDir
53+
}
54+
55+
task checkstyle(type: Checkstyle) {
56+
source 'src'
57+
include '**/*.java'
58+
exclude '**/gen/**'
59+
60+
// empty classpath
61+
classpath = files()
62+
}
63+
64+
afterEvaluate {
65+
if (project.tasks.findByName('check')) {
66+
check.dependsOn('checkstyle')
67+
}
68+
}
69+
70+
gradle.projectsEvaluated {
71+
tasks.withType(JavaCompile) {
72+
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
73+
}
74+
}
75+
}
76+
77+
task clean(type: Delete) {
78+
delete rootProject.buildDir
79+
}

‎checkstyle.xml

Copy file name to clipboard
+152Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
3+
<module name="Checker">
4+
<module name="FileLength"/>
5+
<module name="FileTabCharacter"/>
6+
7+
<module name="SuppressionFilter">
8+
<property name="file" value="${checkStyleConfigDir}/checkstyle_suppressions.xml" />
9+
</module>
10+
11+
<!-- Trailing spaces -->
12+
<module name="RegexpSingleline">
13+
<property name="format" value="\s+$"/>
14+
<property name="message" value="Line has trailing spaces."/>
15+
</module>
16+
17+
<!-- Ensure trailling newline for compatibility -->
18+
<module name="NewlineAtEndOfFile" />
19+
20+
<!-- Space after 'for' and 'if' -->
21+
<module name="RegexpSingleline">
22+
<property name="format" value="^\s*(for|if)\b[^ ]"/>
23+
<property name="message" value="Space needed before opening parenthesis."/>
24+
</module>
25+
26+
<!-- For each spacing -->
27+
<module name="RegexpSingleline">
28+
<property name="format" value="^\s*for \(.*?([^ ]:|:[^ ])"/>
29+
<property name="message" value="Space needed around ':' character."/>
30+
</module>
31+
32+
<module name="TreeWalker">
33+
<!-- Checks for uncommented main() methods (debugging leftovers). -->
34+
<!-- Checks that long constants are defined with an upper ell. -->
35+
<!-- See http://checkstyle.sourceforge.net/config_misc.html#UpperEll -->
36+
<module name="UpperEll" />
37+
38+
<!-- Checks the style of array type definitions. -->
39+
<!-- See http://checkstyle.sourceforge.net/config_misc.html#ArrayTypeStyle -->
40+
<module name="ArrayTypeStyle" />
41+
42+
<!-- Checks that the outer type name and the file name match. -->
43+
<!-- See http://checkstyle.sourceforge.net/config_misc.html#OuterTypeFilename -->
44+
<module name="OuterTypeFilename" />
45+
46+
<!-- Validates Javadoc comments to help ensure they are well formed. -->
47+
<!-- See http://checkstyle.sourceforge.net/config_javadoc.html#JavadocStyle -->
48+
<!--<module name="JavadocStyle" />-->
49+
<!--<module name="JavadocType">-->
50+
<!--<property name="scope" value="public"/>-->
51+
<!--</module>-->
52+
53+
<!-- Each of these naming modules validates identifiers for particular
54+
code elements. -->
55+
<!-- See http://checkstyle.sourceforge.net/config_naming.html -->
56+
<module name="ConstantName">
57+
<property name="format" value="^[A-Z][A-Z0-9\$]*(_[A-Z0-9\$]+)*$" />
58+
</module>
59+
<module name="LocalFinalVariableName" />
60+
<module name="LocalVariableName" />
61+
<module name="MemberName">
62+
<property name="format" value="^[a-zA-Z][a-zA-Z0-9_\$]*$" />
63+
</module>
64+
<module name="MethodName" >
65+
<property name="format" value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
66+
</module>
67+
<module name="PackageName" />
68+
<module name="ParameterName" />
69+
<module name="StaticVariableName" />
70+
<module name="TypeName" />
71+
72+
<module name="TrailingComment" />
73+
74+
<!-- Checks for imports. -->
75+
<!-- See http://checkstyle.sourceforge.net/config_imports.html -->
76+
<module name="AvoidStarImport"/>
77+
<module name="RedundantImport"/>
78+
<module name="UnusedImports"/>
79+
<!-- Default sun.* packages -->
80+
<module name="IllegalImport">
81+
<property name="illegalPkgs" value="sun" />
82+
<message key="import.illegal" value="Import from illegal package - {0}. Programs that contain direct calls to the sun.* packages are not 100% Pure Java." />
83+
</module>
84+
<!-- Prevent importing JUnit 3 classes and Assert methods -->
85+
<module name="IllegalImport">
86+
<property name="illegalPkgs" value="junit" />
87+
<message key="import.illegal" value="Import from illegal package - {0}. Tests are written in JUnit 4, use org.junit.* equivalents." />
88+
</module>
89+
<!-- Prevent importing Mockito matchers directly -->
90+
<module name="IllegalImport">
91+
<property name="illegalPkgs" value="org.mockito.internal" />
92+
<message key="import.illegal" value="Import from illegal package - {0}. Use org.mockito.Matchers to instantiate argument matchers; or org.hamcrest.Matchers for assertThat." />
93+
</module>
94+
95+
<!-- Checks for whitespace. -->
96+
<!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
97+
<module name="GenericWhitespace" />
98+
<module name="MethodParamPad" />
99+
<module name="NoWhitespaceAfter">
100+
<property name="tokens"
101+
value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS" />
102+
</module>
103+
<module name="NoWhitespaceBefore" />
104+
<module name="OperatorWrap" />
105+
<module name="ParenPad" />
106+
<module name="TypecastParenPad" />
107+
<module name="WhitespaceAfter" />
108+
<module name="WhitespaceAround" />
109+
110+
111+
<!-- Modifier Checks. -->
112+
<!-- See http://checkstyle.sourceforge.net/config_modifier.html -->
113+
<module name="ModifierOrder" />
114+
115+
<!-- Checks for blocks. -->
116+
<!-- See http://checkstyle.sourceforge.net/config_blocks.html -->
117+
<module name="AvoidNestedBlocks" />
118+
<module name="EmptyBlock" >
119+
<property name="option" value="text"/>
120+
</module>
121+
<module name="NeedBraces"/>
122+
123+
<module name="LeftCurly" />
124+
<module name="RightCurly">
125+
<property name="tokens"
126+
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_ELSE" />
127+
</module>
128+
129+
<!-- Checks for common coding problems. -->
130+
<!-- See http://checkstyle.sourceforge.net/config_coding.html -->
131+
<module name="CovariantEquals" />
132+
<module name="DefaultComesLast" />
133+
<module name="EmptyStatement" />
134+
<module name="EqualsHashCode" />
135+
<module name="NoClone" />
136+
<module name="NoFinalizer" />
137+
<module name="OneStatementPerLine" />
138+
<module name="IllegalInstantiation"/>
139+
<module name="SimplifyBooleanExpression" />
140+
<module name="SimplifyBooleanReturn" />
141+
<module name="StringLiteralEquality" />
142+
<module name="UnnecessaryParentheses" />
143+
<module name="LineLength">
144+
<property name="max" value="120" />
145+
</module>
146+
147+
<!-- Checks for class design. -->
148+
<!-- See http://checkstyle.sourceforge.net/config_design.html -->
149+
<module name="FinalClass" />
150+
<module name="InterfaceIsType" />
151+
</module>
152+
</module>

‎checkstyle_suppressions.xml

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
5+
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
6+
7+
<suppressions>
8+
<suppress files=".*[/\\]src[/\\]test[/\\].*" checks="Javadoc.*"/>
9+
<suppress files=".*RequestBuilder.java" checks="NoClone" />
10+
</suppressions>

‎gradle.properties

Copy file name to clipboard
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1+
## Project-wide Gradle settings.
2+
#
3+
# For more details on how to configure your build environment visit
4+
# http://www.gradle.org/docs/current/userguide/build_environment.html
5+
#
6+
# Specifies the JVM arguments used for the daemon process.
7+
# The setting is particularly useful for tweaking memory settings.
8+
# Default value: -Xmx1024m -XX:MaxPermSize=256m
9+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10+
#
11+
# When configured, Gradle will run in incubating parallel mode.
12+
# This option should only be used with decoupled projects. More details, visit
13+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14+
# org.gradle.parallel=true
15+
#Thu Dec 08 22:37:35 CST 2016
16+
POM_DEVELOPER_EMAIL=sunsj1231@gmail.com
17+
POM_DEVELOPER_ID=simsun
18+
MIN_SDK_VERSION=10
19+
org.gradle.daemon=true
20+
SUPPORT_LIB_VERSION=25.0.0
21+
POM_DEVELOPER_NAME=Shengjie Sun
22+
POM_DESCRIPTION=TinkerPatch SDK
23+
OKHTTP3_VERSION=3.4.1
24+
OKHTTP_VERSION=2.7.5
25+
org.gradle.jvmargs=-Xmx2048M
26+
FINDBUGS_VERSION=3.0.1
27+
org.gradle.configureondemand=true
28+
BUILD_TOOLS_VERSION=24.0.3
29+
VERSION_NAME=0.3.5
30+
TARGET_SDK_VERSION=24
131
TINKER_VERSION=1.7.6
32+
POM_URL=https\://github.com/TinkerPatch/tinkerpatch-sdk
33+
COMPILE_SDK_VERSION=24
34+
GROUP=com.tencent.tinker
35+
GIT_URL=https\://github.com/TinkerPatch/tinkerpatch-sdk.git

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.