mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Don't publish snapshots for experimental versions
This commit is contained in:
52
build.gradle
52
build.gradle
@@ -308,34 +308,36 @@ import org.w3c.dom.Node
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
// Also publish a snapshot so people can use the latest version if they wish
|
||||
snapshot(MavenPublication) { publication ->
|
||||
groupId project.group
|
||||
artifactId project.base.archivesName.get()
|
||||
version baseVersion + '-SNAPSHOT'
|
||||
if (!ENV.EXPERIMENTAL) {
|
||||
// Also publish a snapshot so people can use the latest version if they wish
|
||||
snapshot(MavenPublication) { publication ->
|
||||
groupId project.group
|
||||
artifactId project.base.archivesName.get()
|
||||
version baseVersion + '-SNAPSHOT'
|
||||
|
||||
from components.java
|
||||
}
|
||||
from components.java
|
||||
}
|
||||
|
||||
// Manually crate the plugin marker for snapshot versions
|
||||
snapshotPlugin(MavenPublication) { publication ->
|
||||
groupId 'fabric-loom'
|
||||
artifactId 'fabric-loom.gradle.plugin'
|
||||
version baseVersion + '-SNAPSHOT'
|
||||
// Manually crate the plugin marker for snapshot versions
|
||||
snapshotPlugin(MavenPublication) { publication ->
|
||||
groupId 'fabric-loom'
|
||||
artifactId 'fabric-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('net.fabricmc')
|
||||
Node artifactId = dependency.appendChild(document.createElement('artifactId'))
|
||||
artifactId.setTextContent('fabric-loom')
|
||||
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('net.fabricmc')
|
||||
Node artifactId = dependency.appendChild(document.createElement('artifactId'))
|
||||
artifactId.setTextContent('fabric-loom')
|
||||
Node version = dependency.appendChild(document.createElement('version'))
|
||||
version.setTextContent(baseVersion + '-SNAPSHOT')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
|
||||
Reference in New Issue
Block a user