-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
136 lines (115 loc) · 2.97 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.github.johnrengelman:shadow:8.1.1'
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
}
}
if(project.hasProperty('ossrhUser') && project.hasProperty("release")) {
apply plugin: "io.github.gradle-nexus.publish-plugin"
nexusPublishing {
repositories {
sonatype {
packageGroup = 'org.mini2Dx'
username = ossrhUser
password = ossrhPassword
}
}
}
}
subprojects {
apply plugin: "java-library"
apply plugin: "signing"
apply plugin: "maven-publish"
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
group = 'org.mini2Dx'
version = '5.0.1'
java {
sourceCompatibility = 1.7
targetCompatibility = 1.7
withJavadocJar()
withSourcesJar()
}
// Maven Central publication
if(project.hasProperty('ossrhUser')) {
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = project.name
description = "Utility for packing images into a tilesheet"
url = 'https://github.com/mini2Dx/tilepacker'
licenses {
license {
name = 'The BSD 3-Clause License'
url = 'https://opensource.org/licenses/BSD-3-Clause'
}
}
developers {
developer {
id = 'tomcashman'
name = 'Thomas Cashman'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/mini2Dx/tilepacker.git'
developerConnection = 'scm:git:[email protected]:mini2Dx/tilepacker.git'
url = 'https://github.com/mini2Dx/tilepacker.git'
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
}
}
project(":" + rootProject.name + "-core") {
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
application {
mainClass = "org.tilepacker.core.TilePacker"
}
dependencies {
implementation 'org.simpleframework:simple-xml:2.7.1'
implementation fileTree(dir: 'lib', include: ['*.jar'])
testImplementation 'org.jmock:jmock-junit4:2.5.1'
testImplementation 'org.jmock:jmock-legacy:2.5.1'
testImplementation 'junit:junit:4.8.2'
}
shadowJar {
archiveBaseName.set(rootProject.name + "-core")
archiveClassifier.set('')
dependencies {
exclude(dependency('org.simpleframework:simple-xml:2.7.1'))
}
}
assemble.dependsOn shadowJar
distTar.dependsOn shadowJar
startScripts.dependsOn shadowJar
startShadowScripts.dependsOn jar
}
project(":" + rootProject.name + "-gradle-plugin") {
apply plugin: 'groovy'
dependencies {
implementation project(":" + rootProject.name + "-core")
implementation gradleApi()
implementation localGroovy()
testImplementation 'org.jmock:jmock-junit4:2.5.1'
testImplementation 'org.jmock:jmock-legacy:2.5.1'
testImplementation 'junit:junit:4.8.2'
}
compileGroovy.dependsOn(":" + rootProject.name + "-core:shadowJar")
}