name.remal.gradle_plugins.toolkit.build_logic.publish-maven-central.gradle Maven / Gradle / Ivy
if (project.isBuildSrcProject) return
allprojects {
pluginManager.withPlugin('maven-publish') {
rootProject.apply plugin: 'io.github.gradle-nexus.publish-plugin'
}
pluginManager.withPlugin('io.github.gradle-nexus.publish-plugin') {
nexusPublishing {
repositories {
sonatype()
}
}
}
}
File flagFile = project.layout.buildDirectory.file('publish-maven-central.flag').get().asFile
flagFile.delete()
allprojects {
pluginManager.withPlugin('io.github.gradle-nexus.publish-plugin') {
flagFile.parentFile.mkdirs()
flagFile.text = ''
}
}