forked from starandserpent/java-TerraServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
81 lines (68 loc) · 2.44 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
plugins {
id "me.champeau.gradle.jmh" version "0.4.5" apply false
}
allprojects {
// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
sourceCompatibility = 10
targetCompatibility = 10
// In this section you declare where to find the dependencies of your project
repositories {
mavenLocal() // Mainly for snapshot Venom builds
jcenter()
maven {
url project.findProperty("ritualsMavenServer") ?: "https://localhost"
credentials {
username project.findProperty("ritualsMavenUser") ?: "invalid-user"
password project.findProperty("ritualsMavenPassword") ?: "invalid-password"
}
}
}
// In this section you declare the dependencies for your production and test code
dependencies {
compile 'org.slf4j:slf4j-api:1.7.21'
testCompile 'junit:junit:4.12'
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId "com.ritualsoftheold"
artifactId project.name
version project.property("version")
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
repositories {
maven {
url project.findProperty("ritualsMavenServer") ?: "https://localhost"
credentials {
username project.findProperty("ritualsMavenUser") ?: "invalid-user"
password project.findProperty("ritualsMavenPassword") ?: "invalid-password"
}
}
}
}
}
// Define JMH for all subprojects that need it
allprojects.findAll { it.name in ['terra-meshgen'] }. each { p ->
configure(p) {
apply plugin: "me.champeau.gradle.jmh"
dependencies {
jmh 'org.openjdk.jmh:jmh-core:1.20'
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.20'
}
tasks.getByName('jmhJar').doFirst() {duplicatesStrategy(DuplicatesStrategy.EXCLUDE)}
jmh {
duplicateClassesStrategy = 'exclude' // See https://github.com/melix/jmh-gradle-plugin/issues/125
fork = 1 // Fork only once to save time
}
}
}