-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
104 lines (88 loc) · 2.67 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.neoforged.gradleutils.PomUtilsExtension.License
plugins {
id 'net.neoforged.gradleutils' version '3.0.0-alpha.4'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}
group = 'net.neoforged.javadoctor'
changelog {
from '1.0'
}
changelog.disableAutomaticPublicationRegistration()
allprojects {
println("${it.name} version: ${version = gradleutils.version}")
}
gradleutils {
setupCentralPublishing()
}
subprojects { proj ->
apply plugin: 'java'
if (name != 'test') {
apply plugin: 'maven-publish'
apply plugin: 'net.neoforged.gradleutils'
}
group = 'net.neoforged.javadoctor'
java {
withJavadocJar()
withSourcesJar()
}
proj.gradleutils {
setupSigning()
}
if (name.startsWith('injector-')) {
apply plugin: 'java-library'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'application'
application {
mainClass.set('net.neoforged.javadoctor.injector.Main')
}
configurations {
dependency
api.extendsFrom(dependency)
}
evaluationDependsOn(':injector')
dependencies {
dependency project(':injector')
}
tasks.named('shadowJar', ShadowJar) {
// JOPT doesn't like being relocated
// enableRelocation = true
// relocationPrefix = 'net.neoforged.javadoctor.injector.relocate'
configurations = [project.configurations.dependency]
}
}
repositories {
mavenCentral {
metadataSources {
mavenPom()
}
}
}
if (name != 'test') {
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
proj.gradleutils.sign(it)
pom {
name = "javadoctor-${proj.name}"
packaging = 'jar'
description = 'A Javadoc injection tool'
inceptionYear = '2023'
pomUtils.neoForgedDeveloper(it)
pomUtils.license(it, License.LGPL_v2)
pomUtils.githubRepo(it, 'Javadoctor')
}
}
}
repositories {
maven gradleutils.publishingMaven
maven {
name 'local'
url file('build/repo')
}
}
}
}
}