1
1
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
+ }
9
9
}
10
10
11
11
apply plugin : ' idea'
@@ -17,131 +17,129 @@ apply plugin: 'com.jfrog.bintray'
17
17
archivesBaseName = archivesBaseName + ' -library'
18
18
19
19
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
+ }
27
27
}
28
28
29
29
archivesBaseName = ' PokeGOAPI-library'
30
30
31
31
// Remove all .proto definition from the final build
32
32
processResources {
33
- exclude(' POGOProtos/' )
34
- exclude(' signature/Signature.proto' )
33
+ exclude(' POGOProtos/' )
34
+ exclude(' signature/Signature.proto' )
35
35
}
36
36
37
37
javadoc {
38
- exclude " **/google/common/geometry/**"
38
+ exclude " **/google/common/geometry/**"
39
39
}
40
40
41
41
// Run this task to bundle all needed dependency
42
42
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
46
46
}
47
47
48
48
jar. finalizedBy(bundle)
49
49
50
50
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
+ }
56
56
}
57
57
58
58
def checkstyleOutputDir = " ${ project.projectDir} /build/reports/checkstyle/"
59
59
60
60
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)
65
65
66
- ignoreFailures = false
66
+ ignoreFailures = false
67
67
68
- checkstyleMain {
69
- source = sourceSets. main. allSource
70
- }
68
+ checkstyleMain {
69
+ source = sourceSets. main. allSource
70
+ }
71
71
72
- configurations {
73
- checkstyle
74
- }
72
+ configurations {
73
+ checkstyle
74
+ }
75
75
76
-
77
- dependencies {
78
- checkstyle " com.puppycrawl.tools:checkstyle:${ toolVersion} "
79
- }
76
+ dependencies {
77
+ checkstyle " com.puppycrawl.tools:checkstyle:${ toolVersion} "
78
+ }
80
79
}
81
80
82
81
// Abort if any checkstyle warnings
83
82
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
+ }
91
90
}
92
91
93
92
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'
103
102
}
104
103
105
104
idea {
106
- module {
107
- sourceDirs + = file(" ${ protobuf.generatedFilesBaseDir} /main/java" );
108
- }
105
+ module {
106
+ sourceDirs + = file(" ${ protobuf.generatedFilesBaseDir} /main/java" );
107
+ }
109
108
}
110
109
111
110
task sourcesJar (type : Jar , dependsOn : classes) {
112
- classifier = ' sources'
113
- from sourceSets. main. allJava
111
+ classifier = ' sources'
112
+ from sourceSets. main. allJava
114
113
}
115
114
116
115
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
121
120
}
122
121
123
122
artifacts {
124
- archives sourcesJar
125
- archives javadocJar
123
+ archives sourcesJar
124
+ archives javadocJar
126
125
}
127
126
128
127
Properties properties = new Properties ()
129
128
try {
130
- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
129
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
131
130
} catch (Exception ignore) {
132
131
}
133
132
134
133
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
+ }
146
145
}
147
-
0 commit comments