forked from jabbink/PokemonGoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (78 loc) · 2.65 KB
/
build.gradle
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
group 'ink.abb'
version '0.5.0'
buildscript {
ext {
kotlin_version = '1.0.3'
springBootVersion = '1.3.6.RELEASE'
jacksonVersion = '2.8.0'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'spring-boot'
mainClassName = 'ink.abb.pogo.scraper.MainKt'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
def generatedResourcesFolder = "$projectDir/build/resources/main"
sourceSets {
main {
kotlin {
srcDir 'src/main/kotlin'
}
java {
srcDir 'lib/com.google.guava'
}
resources.srcDirs generatedResourcesFolder
}
}
configurations {
compile.exclude module: "spring-boot-starter-tomcat"
}
dependencies {
//compile files('../PokeGOAPI-Java/library/build/libs/PokeGOAPI-library-all-0.3.0.jar')
compile 'com.github.Grover-c13:PokeGOAPI-Java:ef1f52f1f0621f94b97125975c961a8ad8129e92'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "com.corundumstudio.socketio:netty-socketio:1.7.7"
compile 'org.springframework.boot:spring-boot-starter'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-undertow'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jacksonVersion
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: jacksonVersion
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': mainClassName
)
}
}
task createProperties(dependsOn: processResources) << {
String versionDir = "$buildDir/resources/main/ink/abb/pogo/scraper"
new File(versionDir).mkdirs()
new File("$versionDir/version.properties").withWriter { w ->
Properties p = new Properties()
p['version'] = project.version.toString()
p.store w, null
}
}
classes {
dependsOn createProperties
}