mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Merge 1.7, part 3
This commit is contained in:
48
build.gradle
48
build.gradle
@@ -316,6 +316,16 @@ test {
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround https://github.com/gradle/gradle/issues/25898
|
||||
tasks.withType(Test).configureEach {
|
||||
jvmArgs = [
|
||||
'--add-opens=java.base/java.lang=ALL-UNNAMED',
|
||||
'--add-opens=java.base/java.util=ALL-UNNAMED',
|
||||
'--add-opens=java.base/java.lang.invoke=ALL-UNNAMED',
|
||||
'--add-opens=java.base/java.net=ALL-UNNAMED'
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
import org.gradle.api.internal.artifacts.configurations.ConfigurationRoles
|
||||
import org.gradle.launcher.cli.KotlinDslVersion
|
||||
@@ -326,8 +336,7 @@ import org.w3c.dom.Node
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
if (isSnapshot) return
|
||||
|
||||
if (!isSnapshot && !ENV.EXPERIMENTAL) {
|
||||
// Also publish a snapshot so people can use the latest version if they wish
|
||||
snapshot(MavenPublication) { publication ->
|
||||
groupId project.group
|
||||
@@ -337,24 +346,25 @@ publishing {
|
||||
from components.java
|
||||
}
|
||||
|
||||
// Manually crate the plugin marker for snapshot versions
|
||||
snapshotPlugin(MavenPublication) {
|
||||
groupId 'dev.architectury.loom'
|
||||
artifactId 'dev.architectury.loom.gradle.plugin'
|
||||
version baseVersion + '-SNAPSHOT'
|
||||
// Manually crate the plugin marker for snapshot versions
|
||||
snapshotPlugin(MavenPublication) {
|
||||
groupId 'dev.architectury.loom'
|
||||
artifactId 'dev.architectury.loom.gradle.plugin'
|
||||
version baseVersion + '-SNAPSHOT'
|
||||
|
||||
pom.withXml {
|
||||
// Based off org.gradle.plugin.devel.plugins.MavenPluginPublishPlugin
|
||||
Element root = asElement()
|
||||
Document document = root.getOwnerDocument()
|
||||
Node dependencies = root.appendChild(document.createElement('dependencies'))
|
||||
Node dependency = dependencies.appendChild(document.createElement('dependency'))
|
||||
Node groupId = dependency.appendChild(document.createElement('groupId'))
|
||||
groupId.setTextContent(project.group)
|
||||
Node artifactId = dependency.appendChild(document.createElement('artifactId'))
|
||||
artifactId.setTextContent(project.archivesBaseName)
|
||||
Node version = dependency.appendChild(document.createElement('version'))
|
||||
version.setTextContent(baseVersion + '-SNAPSHOT')
|
||||
pom.withXml({
|
||||
// Based off org.gradle.plugin.devel.plugins.MavenPluginPublishPlugin
|
||||
Element root = asElement()
|
||||
Document document = root.getOwnerDocument()
|
||||
Node dependencies = root.appendChild(document.createElement('dependencies'))
|
||||
Node dependency = dependencies.appendChild(document.createElement('dependency'))
|
||||
Node groupId = dependency.appendChild(document.createElement('groupId'))
|
||||
groupId.setTextContent(project.group)
|
||||
Node artifactId = dependency.appendChild(document.createElement('artifactId'))
|
||||
artifactId.setTextContent(project.archivesBaseName)
|
||||
Node version = dependency.appendChild(document.createElement('version'))
|
||||
version.setTextContent(baseVersion + '-SNAPSHOT')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user