mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Support classpath groups when using configure on demand. (#1392)
* Support classpath groups when using configure on demand. * Cleanup * Work around Gradle 8.14 issue * Another fix * Rename plugin * Fix plugin versioning * Add some docs * More fixes * Ensure backwards compatible.
This commit is contained in:
42
build.gradle
42
build.gradle
@@ -237,6 +237,10 @@ gradlePlugin {
|
||||
id = 'fabric-loom'
|
||||
implementationClass = 'net.fabricmc.loom.LoomGradlePlugin'
|
||||
}
|
||||
fabricLoomCompanion {
|
||||
id = 'net.fabricmc.fabric-loom-companion'
|
||||
implementationClass = 'net.fabricmc.loom.LoomCompanionGradlePlugin'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,25 +296,27 @@ publishing {
|
||||
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'
|
||||
gradlePlugin.plugins.forEach { plugin ->
|
||||
// Manually crate the plugin marker for snapshot versions
|
||||
it.create(plugin.id + "SnapshotMarker", MavenPublication) { publication ->
|
||||
groupId = plugin.id
|
||||
artifactId = plugin.id + '.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(project.version)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user