-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (93 loc) · 3.21 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
group = 'com.ziluck'
version = '2.2.0-SNAPSHOT'
description = 'Spigot plugin for enabling the Fortune enchantment on any block'
archivesBaseName = 'fortuneblocks'
sourceCompatibility = '1.8'
jar {
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task sourcesJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
javadoc {
options.links += "https://hub.spigotmc.org/javadocs/spigot/"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
// spigot
implementation group: 'org.spigotmc', name: 'spigot-api', version: '1.14.4-R0.1-SNAPSHOT'
// flyway
compile group: 'org.flywaydb', name: 'flyway-core', version: '6.0.+'
// mybatis
compile group: 'org.mybatis', name: 'mybatis', version: '3.5.+'
// sql drivers
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.6'
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.+'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.18.0'
testCompile group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.0'
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.0'
testCompile group: 'org.json', name: 'json', version: '20190722'
testCompile group: 'commons-io', name: 'commons-io', version: '2.6'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'fortuneblocks'
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = rootProject.name
description = rootProject.description
url = "https://www.spigotmc.org/resources/fortuneblocks.8766/"
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'mzilu'
name = 'Michael Ziluck'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/ZiluckMichael/FortuneBlocks.git'
developerConnection = 'scm:git:ssh://github.com/ZiluckMichael/FortuneBlocks.git'
url = 'https://github.com/ZiluckMichael/FortuneBlocks'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}