forked from CadixDev/Vignette
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
140 lines (119 loc) · 4.35 KB
/
build.gradle
File metadata and controls
140 lines (119 loc) · 4.35 KB
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
137
138
139
140
plugins {
id 'java'
id 'maven'
id 'com.github.johnrengelman.shadow' version '4.0.3'
id 'net.minecraftforge.gradleutils' version '1.+'
}
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
group = 'net.minecraftforge.lex' // Repackaged from 'org.cadixdev' to publish on Forge's Maven with out transformers
archivesBaseName = project.name.toLowerCase()
version = gradleutils.getTagOffsetVersion()
repositories {
mavenCentral()
}
dependencies {
implementation "org.cadixdev:atlas:$atlasVersion"
implementation "org.cadixdev:lorenz:$lorenzVersion"
implementation "org.cadixdev:lorenz-asm:$lorenzVersion"
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'org.ow2.asm:asm-commons:9.1'
implementation 'com.google.jimfs:jimfs:1.2'
}
processResources {
from 'LICENSE.txt'
}
shadowJar {
mergeServiceFiles()
}
jar {
manifest {
attributes(
'Implementation-Title': name,
'Implementation-Version': version,
'Main-Class': 'org.cadixdev.vignette.VignetteMain'
)
}
}
task javadocJar(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
classifier = 'javadoc'
}
task sourcesJar(type: Jar, dependsOn: 'classes') {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives shadowJar
archives javadocJar
archives sourcesJar
}
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
apply plugin: 'signing'
signing {
required { !version.endsWith('-SNAPSHOT') && gradle.taskGraph.hasTask(tasks.uploadArchives) }
sign configurations.archives
}
}
uploadArchives {
repositories {
mavenDeployer {
// Maven Central
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
}
// Forge's maven
if (System.env.MAVEN_USER) {
repository(url: 'https://maven.minecraftforge.net/') {
authentication(
userName: System.env.MAVEN_USER ?: 'not',
password: System.env.MAVEN_PASSWORD ?: 'set'
)
}
} else {
repository(url: 'file://' + rootProject.file('repo').getAbsolutePath())
}
pom {
artifactId = project.archivesBaseName
project {
name = project.name
description = project.description
packaging = 'jar'
url = project.url
inceptionYear = project.inceptionYear
scm {
url = 'https://github.com/CadixDev/Vignette'
connection = 'scm:git:https://github.com/CadixDev/Vignette.git'
developerConnection = 'scm:git:git@github.com:CadixDev/Vignette.git'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/CadixDev/Vignette/issues'
}
licenses {
license {
name = 'Mozilla Public License 2.0'
url = 'https://opensource.org/licenses/MPL-2.0'
distribution = 'repo'
}
}
developers {
developer {
id = 'jamierocks'
name = 'Jamie Mansfield'
email = 'jmansfield@cadixdev.org'
url = 'https://www.jamiemansfield.me/'
timezone = 'Europe/London'
}
}
}
}
}
}
}