Skip to content

Commit 1e854c2

Browse files
committed
fix TwoFish typo checkstyle
1 parent 40ff0f6 commit 1e854c2

File tree

4 files changed

+223
-200
lines changed

4 files changed

+223
-200
lines changed

library/build.gradle

+78-80
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
2-
repositories {
3-
jcenter()
4-
}
5-
dependencies {
6-
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.4'
7-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1"
8-
}
2+
repositories {
3+
jcenter()
4+
}
5+
dependencies {
6+
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.4'
7+
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1"
8+
}
99
}
1010

1111
apply plugin: 'idea'
@@ -17,131 +17,129 @@ apply plugin: 'com.jfrog.bintray'
1717
archivesBaseName = archivesBaseName + '-library'
1818

1919
sourceSets {
20-
main {
21-
proto {
22-
// Need to use custom dir cause Gradle doesn't like us otherwise :(
23-
srcDir 'src/resources/protobuf/src'
24-
include '**/*.proto'
25-
}
26-
}
20+
main {
21+
proto {
22+
// Need to use custom dir cause Gradle doesn't like us otherwise :(
23+
srcDir 'src/resources/protobuf/src'
24+
include '**/*.proto'
25+
}
26+
}
2727
}
2828

2929
archivesBaseName = 'PokeGOAPI-library'
3030

3131
// Remove all .proto definition from the final build
3232
processResources {
33-
exclude('POGOProtos/')
34-
exclude('signature/Signature.proto')
33+
exclude('POGOProtos/')
34+
exclude('signature/Signature.proto')
3535
}
3636

3737
javadoc {
38-
exclude "**/google/common/geometry/**"
38+
exclude "**/google/common/geometry/**"
3939
}
4040

4141
// Run this task to bundle all needed dependency
4242
task bundle(type: Jar) {
43-
baseName = archivesBaseName + '-all'
44-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
45-
with jar
43+
baseName = archivesBaseName + '-all'
44+
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
45+
with jar
4646
}
4747

4848
jar.finalizedBy(bundle)
4949

5050
protobuf {
51-
// Configure the protoc executable
52-
protoc {
53-
// Download from repositories
54-
artifact = 'com.google.protobuf:protoc:3.6.1'
55-
}
51+
// Configure the protoc executable
52+
protoc {
53+
// Download from repositories
54+
artifact = 'com.google.protobuf:protoc:3.6.1'
55+
}
5656
}
5757

5858
def checkstyleOutputDir = "${project.projectDir}/build/reports/checkstyle/"
5959

6060
checkstyle {
61-
toolVersion = '7.0'
62-
configFile = file("${project.projectDir}/config/checkstyle.xml")
63-
configProperties = [ "suppressionFile" : file("${project.projectDir}/config/suppressions.xml")]
64-
reportsDir = file(checkstyleOutputDir)
61+
toolVersion = '7.0'
62+
configFile = file("${project.projectDir}/config/checkstyle.xml")
63+
configProperties = ["suppressionFile": file("${project.projectDir}/config/suppressions.xml")]
64+
reportsDir = file(checkstyleOutputDir)
6565

66-
ignoreFailures = false
66+
ignoreFailures = false
6767

68-
checkstyleMain {
69-
source = sourceSets.main.allSource
70-
}
68+
checkstyleMain {
69+
source = sourceSets.main.allSource
70+
}
7171

72-
configurations {
73-
checkstyle
74-
}
72+
configurations {
73+
checkstyle
74+
}
7575

76-
77-
dependencies {
78-
checkstyle "com.puppycrawl.tools:checkstyle:${toolVersion}"
79-
}
76+
dependencies {
77+
checkstyle "com.puppycrawl.tools:checkstyle:${toolVersion}"
78+
}
8079
}
8180

8281
//Abort if any checkstyle warnings
8382
checkstyleMain.doLast {
84-
def outputFile = file(checkstyleOutputDir + "main.xml")
85-
if (outputFile.exists() && outputFile.text.contains("<error ")) {
86-
logger.warn("!!!!-----------------------------------!!!!")
87-
logger.warn("There were checkstyle warnings! For more info check $outputFile")
88-
logger.warn("PLEASE CORRECT BEFORE SUBMITTING A PULLREQUEST")
89-
logger.warn("!!!!-----------------------------------!!!!")
90-
}
83+
def outputFile = file(checkstyleOutputDir + "main.xml")
84+
if (outputFile.exists() && outputFile.text.contains("<error ")) {
85+
logger.warn("!!!!-----------------------------------!!!!")
86+
logger.warn("There were checkstyle warnings! For more info check $outputFile")
87+
logger.warn("PLEASE CORRECT BEFORE SUBMITTING A PULLREQUEST")
88+
logger.warn("!!!!-----------------------------------!!!!")
89+
}
9190
}
9291

9392
dependencies {
94-
compile 'svarzee.gps:gpsoauth:0.3'
95-
compile 'com.squareup.okio:okio:2.0.0'
96-
compile 'com.squareup.moshi:moshi:1.6.0'
97-
compile 'com.annimon:stream:1.2.1'
98-
compile 'com.squareup.okhttp3:okhttp:3.11.0'
99-
compile 'com.google.protobuf:protobuf-java:3.6.1'
100-
compile 'io.reactivex:rxjava:1.3.4'
101-
compile 'net.jpountz.lz4:lz4:1.3.0'
102-
compileOnly 'org.projectlombok:lombok:1.18.2'
93+
compile 'svarzee.gps:gpsoauth:0.3'
94+
compile 'com.squareup.okio:okio:2.0.0'
95+
compile 'com.squareup.moshi:moshi:1.6.0'
96+
compile 'com.annimon:stream:1.2.1'
97+
compile 'com.squareup.okhttp3:okhttp:3.11.0'
98+
compile 'com.google.protobuf:protobuf-java:3.6.1'
99+
compile 'io.reactivex:rxjava:1.3.4'
100+
compile 'net.jpountz.lz4:lz4:1.3.0'
101+
compileOnly 'org.projectlombok:lombok:1.18.2'
103102
}
104103

105104
idea {
106-
module {
107-
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java");
108-
}
105+
module {
106+
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java");
107+
}
109108
}
110109

111110
task sourcesJar(type: Jar, dependsOn: classes) {
112-
classifier = 'sources'
113-
from sourceSets.main.allJava
111+
classifier = 'sources'
112+
from sourceSets.main.allJava
114113
}
115114

116115
task javadocJar(type: Jar, dependsOn: javadoc) {
117-
classifier = 'javadoc'
118-
javadoc.failOnError(false);
119-
javadoc.source = sourceSets.main.allJava
120-
from javadoc.destinationDir
116+
classifier = 'javadoc'
117+
javadoc.failOnError(false);
118+
javadoc.source = sourceSets.main.allJava
119+
from javadoc.destinationDir
121120
}
122121

123122
artifacts {
124-
archives sourcesJar
125-
archives javadocJar
123+
archives sourcesJar
124+
archives javadocJar
126125
}
127126

128127
Properties properties = new Properties()
129128
try {
130-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
129+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
131130
} catch (Exception ignore) {
132131
}
133132

134133
bintray {
135-
user = properties.getProperty('user')
136-
key = properties.getProperty('apiKey')
137-
configurations = ['archives']
138-
pkg {
139-
repo = 'maven'
140-
name = 'PokeGOAPI'
141-
userOrg = user
142-
licenses = ['GPL-3.0']
143-
vcsUrl = 'https://github.com/Grover-c13/PokeGOAPI-Java.git'
144-
publish = true
145-
}
134+
user = properties.getProperty('user')
135+
key = properties.getProperty('apiKey')
136+
configurations = ['archives']
137+
pkg {
138+
repo = 'maven'
139+
name = 'PokeGOAPI'
140+
userOrg = user
141+
licenses = ['GPL-3.0']
142+
vcsUrl = 'https://github.com/Grover-c13/PokeGOAPI-Java.git'
143+
publish = true
144+
}
146145
}
147-

library/config/suppressions.xml

-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@
2121

2222
<suppressions>
2323
<suppress checks="." files="com[\\/]pokegoapi[\\/]google[\\/]common[\\/]geometry[\\/]"/>
24-
<suppress checks="." files="com[\\/]pokegoapi[\\/]util[\\/]Crypto\.java"/>
2524
<suppress checks="." files="[\\/]build[\\/]"/>
2625
</suppressions>

library/src/main/java/com/pokegoapi/api/PokemonGo.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ public void setLocation(double latitude, double longitude, double altitude) {
385385
public void setLocation(double latitude, double longitude, double altitude, double accuracy) {
386386
setLatitude(latitude);
387387
setLongitude(longitude);
388-
//setAltitude(altitude);
389-
//setAccuracy(accuracy);
388+
this.altitude = altitude;
389+
this.accuracy = accuracy;
390390
}
391391

392392
public long currentTimeMillis() {

0 commit comments

Comments
 (0)