-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
120 lines (99 loc) · 3.14 KB
/
build.gradle
File metadata and controls
120 lines (99 loc) · 3.14 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
import org.gradle.api.attributes.plugin.GradlePluginApiVersion
plugins {
id 'java-gradle-plugin'
id 'idea'
id 'eclipse'
id 'maven-publish'
alias libs.plugins.licenser
alias libs.plugins.gradleutils
alias libs.plugins.gitversion
alias libs.plugins.changelog
alias libs.plugins.plugin.publish
}
final projectDisplayName = 'Gradle Jar Signer Plugin'
final projectArtifactId = base.archivesName = 'gradlejarsigner'
final projectVendor = 'Forge Development LLC'
description = 'Wrapper for Ant signjar, allowing proper task caching'
group = 'net.minecraftforge'
version = gitversion.tagOffset
println "Version: $version"
java {
toolchain.languageVersion = JavaLanguageVersion.of(8)
withSourcesJar()
//withJavadocJar()
}
/*
configurations {
// Applies the "Gradle Plugin API Version" attribute to configuration
// This was added in Gradle 7, gives consumers useful errors if they are on an old version
def applyGradleVersionAttribute = { Configuration configuration ->
configuration.attributes {
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(GradlePluginApiVersion, libs.versions.gradle.get()))
}
}
named('runtimeElements', applyGradleVersionAttribute)
}
*/
dependencies {
// Static Analysis
compileOnly libs.nulls
// Gradle API
compileOnly libs.gradle
}
license {
header = rootProject.file('LICENSE-header.txt')
newLine = false
exclude '**/*.properties'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.named('jar', Jar) {
manifest {
attributes([
'Specification-Title' : projectDisplayName,
'Specification-Vendor' : projectVendor,
'Specification-Version' : gitversion.info.tag,
'Implementation-Title' : projectDisplayName,
'Implementation-Vendor' : projectVendor,
'Implementation-Version': project.version
], 'net/minecraftforge/gradlejarsigner/')
}
}
changelog {
from '1.0'
publishAll = false
}
gradlePlugin {
website = gitversion.url
vcsUrl = gitversion.url + '.git'
plugins.register('gradlejarsigner') {
id = 'net.minecraftforge.gradlejarsigner'
implementationClass = 'net.minecraftforge.gradlejarsigner.GradleJarSignerPlugin'
displayName = projectDisplayName
description = project.description
tags = ['signing', 'java', 'signjar']
}
}
publishing {
repositories {
maven gradleutils.publishingForgeMaven
}
publications.register('pluginMaven', MavenPublication) {
artifactId = projectArtifactId
changelog.publish(it)
pom { pom ->
name = projectDisplayName
description = project.description
gradleutils.pom.addRemoteDetails(pom)
licenses {
license gradleutils.pom.licenses.LGPLv2_1
}
developers {
developer gradleutils.pom.developers.LexManos
}
}
}
}
idea.module { downloadSources = downloadJavadoc = true }
eclipse.classpath { downloadSources = downloadJavadoc = true }