forked from Grover-c13/PokeGOAPI-Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
74 lines (62 loc) · 1.54 KB
/
build.gradle
File metadata and controls
74 lines (62 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
group = 'com.github.aphoh'
version = '0.0.1-SNAPSHOT'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.7'
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.google.protobuf'
description = """Pokemon Go Java API"""
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenCentral()
}
sourceSets {
main {
proto {
// Need to use custom dir cause Gradle doesn't like us otherwise :(
srcDir 'src/resources/protobuf/pogo'
include '**/*.proto'
}
}
}
// Remove all .proto definition from the final build
processResources {
exclude('**/*')
}
// Run this task to bundle all needed dependency
task bundle(type: Jar) {
baseName = project.name + '_bundle'
from {
configurations.compile.collect {
it.isDirectory() && !it.isEmpty() ? it : zipTree(it)
}
}
with jar
}
protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.0.0-beta-3'
}
}
dependencies {
compile 'com.google.code.gson:gson:2.7'
compile 'net.sourceforge.streamsupport:streamsupport:1.5'
compile 'com.squareup.okhttp3:okhttp:3.4.0-RC1'
compile 'com.google.protobuf:protobuf-java:3.0.0-beta-3'
compileOnly 'org.projectlombok:lombok:1.16.6'
}
idea {
module {
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java");
}
}