-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (63 loc) · 1.68 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
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'
group = pluginGroup
version = pluginVersion
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
embed
compile.extendsFrom(embed)
}
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
kapt {
generateStubs = true
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile 'org.spigotmc:spigot-api:1.12.1-R0.1-SNAPSHOT'
embed "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
embed 'com.squareup.retrofit2:retrofit:2.3.0'
embed('com.squareup.retrofit2:converter-moshi:2.3.0') {
exclude module: 'retrofit'
exclude module: 'okio'
}
embed('com.squareup.retrofit2:adapter-rxjava2:2.3.0') {
exclude module: 'retrofit'
exclude module: 'rxjava'
}
embed 'io.reactivex.rxjava2:rxjava:2.1.6'
embed 'com.google.dagger:dagger:2.13'
kapt 'com.google.dagger:dagger-compiler:2.13'
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}
buildscript {
ext.kotlin_version = '1.2.0'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
jar {
from { configurations.embed.collect { it.isDirectory() ? it : zipTree(it) } }
}