-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
110 lines (97 loc) · 2.98 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
plugins {
id 'java-library'
id 'maven-publish'
id 'eclipse'
alias(libs.plugins.license)
alias(libs.plugins.gradleutils)
}
group = 'net.minecraftforge'
version = gradleutils.tagOffsetVersion
print("Version: $version")
java {
toolchain.languageVersion = JavaLanguageVersion.of(16)
modularity.inferModulePath.set(true)
withSourcesJar()
}
repositories {
mavenCentral()
maven gradleutils.forgeMaven
}
dependencies {
api(libs.bundles.asm)
implementation(libs.unsafe)
}
configurations.all {
outgoing {
capability("net.minecraftforge:$project.name:$version") // For sub modules, they require the exact casing of the name
capability("net.minecraftforge:securemodules:$version")
capability("cpw.mods:securejarhandler:$version")
}
}
changelog {
from '0.9'
}
tasks.named('jar', Jar).configure {
manifest {
attributes([
'Specification-Title': 'SecureModules',
'Specification-Vendor': 'Forge Development LLC',
'Specification-Version': gradleutils.gitInfo.tag,
'Implementation-Title': 'SecureModules',
'Implementation-Version': project.version,
'Implementation-Vendor': 'Forge Development LLC'
] as LinkedHashMap)
}
}
tasks.register('writeManifest') {
doLast {
jar.manifest.writeTo(file('src/main/resources/META-INF/MANIFEST.MF'))
}
}
eclipse {
synchronizationTasks writeManifest
autoBuildTasks writeManifest
}
license {
header = file("LICENSE-header.txt")
}
publishing {
publications.register('mavenJava', MavenPublication) {
configurations.all {
suppressPomMetadataWarningsFor(it.name)
}
from components.java
artifactId = 'securemodules'
pom {
name = 'Secure Modular handler'
description = 'Making the Java modular system provide security information'
license gradleutils.pom.Licenses.LGPLv2_1
developers {
developer gradleutils.pom.Developers.cpw
developer gradleutils.pom.Developers.LexManos
}
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}
// Hack eclipse into knowing that the gradle deps are modules
eclipse.classpath {
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
file.whenMerged { entries.findAll { it.kind == 'lib' || it.path == 'org.eclipse.buildship.core.gradleclasspathcontainer' }.each { it.entryAttributes['module'] = 'true' } }
}
allprojects {
ext.VALID_VMS = [
'Adoptium': [16, 17, 18, 19, 20, 21, 22],
'Amazon': [16, 17, 18, 19, 20, 21, 22],
'Azul': (16..22),
'BellSoft': (16..22),
'Graal_VM': [16, 17, 19, 20, 21, 22],
'IBM': [16, 17, 18, 19, 20, 21 ],
'Microsoft': [16, 17, 21 ],
'Oracle': (16..22),
'SAP': (16..22)
]
//ext.VALID_VMS = [ 'Adoptium': [16] ]
}