gradle-plugins/gradle-plugin-sonatype-publish/build.gradle

42 lines
1.2 KiB
Groovy

plugins {
id 'java-gradle-plugin'
alias(libs.plugins.publish)
}
apply plugin: 'java-gradle-plugin'
apply plugin: 'com.gradle.plugin-publish'
apply from: rootProject.file('gradle/compile/java.gradle')
apply from: rootProject.file('gradle/test/junit5.gradle')
dependencies {
api gradleApi()
testImplementation gradleTestKit()
}
publishing {
repositories {
maven {
name = 'localRepository'
url = 'build/local-repository'
}
}
}
if (project.hasProperty('gradle.publish.key')) {
gradlePlugin {
website = 'https://xbib.org/joerg/gradle-plugins/src/branch/main/gradle-plugin-sonatype-publish'
vcsUrl = 'https://xbib.org/joerg/gradle-plugins'
plugins {
sonatypePublishPlugin {
id = 'org.xbib.gradle.plugin.sonatype.publish'
group = project.group
version = project.version
description = 'Sonatype publishing plugin'
displayName = 'Sonatype publishing plugin'
implementationClass = 'org.xbib.gradle.plugin.sonatype.publish.SonatypePublishPlugin'
tags.set(['sonatype', 'publish', 'mavencentral'])
}
}
}
}