1+ import net.neoforged.gradleutils.PomUtilsExtension.License
2+
13buildscript {
24 dependencies {
35 classpath(' de.jjohannes.gradle:extra-java-module-info:0.14' )
@@ -6,7 +8,7 @@ buildscript {
68
79plugins {
810 id ' com.github.ben-manes.versions' version ' 0.42.0'
9- id ' net.neoforged.gradleutils' version ' [2 .0.16,3) '
11+ id ' net.neoforged.gradleutils' version ' 3 .0.0-alpha.4 '
1012}
1113
1214apply plugin : ' maven-publish'
@@ -21,7 +23,7 @@ allprojects {
2123 toolchain. languageVersion = JavaLanguageVersion . of(16 )
2224 modularity. inferModulePath. set(true )
2325 }
24- version = gradleutils. getTagOffsetVersion()
26+ version = gradleutils. version
2527
2628 repositories {
2729 mavenLocal()
@@ -112,7 +114,7 @@ compileTestJava {
112114
113115group = ' cpw.mods'
114116
115- version = gradleutils. getTagOffsetVersion()
117+ version = gradleutils. version
116118logger. lifecycle(' Version: ' + version)
117119
118120ext. asmVersion = 9.3
@@ -125,42 +127,24 @@ dependencies {
125127}
126128
127129changelog {
128- fromTag " 0.9"
130+ from ' 0.9'
129131}
130132
131- task sourcesJar (type : Jar ) {
132- archiveClassifier = ' sources'
133- from sourceSets. main. allSource
133+ java {
134+ withSourcesJar()
134135}
135136
136- // jmh {
137- // benchmarkMode = ['avgt' ]
138- // profilers = [ 'stack', 'jfr:dir=./build/results/jmh/' ]
139- // timeOnIteration = '3s'
140- // warmup = '2s'
141- // warmupIterations = 3
142- // iterations = 3
143- // fork = 3
144- // timeUnit = 'us'
145- // // JMH loads the main sourceset without a module context, so add exports and opens for required stuff to all unnamed and disable the missing module crash
146- // jvmArgsPrepend = ['--add-opens java.base/java.util.jar=ALL-UNNAMED --add-exports java.base/sun.security.util=ALL-UNNAMED -Dsecurejarhandler.throwOnMissingModule=false']
147- // }
148-
149- // tasks['jmh'].dependsOn(clean)
150-
151137jar {
152138 manifest {
153139 attributes(
154140 ' Specification-Title' : ' securejarhandler' ,
155- ' Specification-Vendor' : ' neoforged ' ,
141+ ' Specification-Vendor' : ' mcmodlauncher ' ,
156142 ' Specification-Version' : ' 1' , // We are version 1 of ourselves
157143 ' Implementation-Title' : project. name,
158- ' Implementation-Version' : " ${ project.version} +${ System.getenv('BUILD_NUMBER')?:0} +${ gradleutils.gitInfo.branch} .${ gradleutils.gitInfo.abbreviatedId} " ,
159- ' Implementation-Vendor' :' neoforged' ,
160- ' Implementation-Timestamp' : java.time.Instant . now(). toString(),
144+ ' Implementation-Version' : " ${ project.version} +${ gradleutils.gitInfo.branch} .${ gradleutils.gitInfo.abbreviatedId} " ,
145+ ' Implementation-Vendor' :' mcmodlauncher' ,
161146 ' Git-Commit' : gradleutils. gitInfo. abbreviatedId,
162- ' Git-Branch' : gradleutils. gitInfo. branch,
163- ' Build-Number' : " ${ System.getenv("BUILD_NUMBER")?:0} " ,
147+ ' Git-Branch' : gradleutils. gitInfo. branch
164148 )
165149 }
166150}
@@ -178,16 +162,8 @@ publishing {
178162 pom {
179163 name = ' Secure Modular Jar handler'
180164 description = ' Making the Java modular system provide security information'
181- url = ' https://github.com/McModLauncher/securejarhandler'
182- scm {
183- url = ' https://github.com/McModLauncher/securejarhandler'
184- connection = ' scm:git:git://github.com/McModLauncher/securejarhandler.git'
185- developerConnection = ' scm:git:git@github.com:McModLauncher/securejarhandler.git'
186- }
187- issueManagement {
188- system = ' github'
189- url = ' https://github.com/McModLauncher/securejarhandler/issues'
190- }
165+ pomUtils. githubRepo(it, ' SecureJarHandler' , ' McModLauncher' )
166+ pomUtils. license(it, License . MIT )
191167
192168 developers {
193169 developer {
@@ -199,6 +175,6 @@ publishing {
199175 }
200176 }
201177 repositories {
202- maven gradleutils. getPublishingForgeMaven()
178+ maven gradleutils. maven
203179 }
204180}
0 commit comments