buildscript { repositories { maven { url 'https://plugins.gradle.org/m2/' } } dependencies { classpath 'io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin:1.1.0' classpath 'net.nemerosa.versioning:net.nemerosa.versioning.gradle.plugin:2.14.0' classpath 'net.researchgate.release:net.researchgate.release.gradle.plugin:2.8.1' classpath 'org.ajoberstar:gradle-git-publish:3.0.0' } } apply plugin: 'java-library' apply plugin: 'maven-publish' apply plugin: 'signing' apply plugin: 'wrapper' apply plugin: io.github.gradlenexus.publishplugin.NexusPublishPlugin apply plugin: net.nemerosa.versioning.VersioningPlugin apply plugin: net.researchgate.release.ReleasePlugin apply plugin: org.ajoberstar.gradle.git.publish.GitPublishPlugin ext { githubUrl = "https://github.com/concordion/${project.name}" issuesUrl = "${githubUrl}/issues" vcsUrl = "${githubUrl}.git" gitRepoUri = "git@github.com:concordion/${project.name}.git" vcsConnection = "scm:git:git://github.com/concordion/${project.name}.git" if (!project.hasProperty("sonatypeUsername")) { sonatypeUsername = '' } if (!project.hasProperty("sonatypePassword")) { sonatypePassword = '' } } repositories { mavenCentral() } wrapper { gradleVersion = "7.1" } dependencies { implementation 'org.concordion:concordion:4.0.0' testImplementation 'org.concordion:concordion:4.0.0:tests' } compileJava { sourceCompatibility = 8 targetCompatibility = 8 } java { withJavadocJar() withSourcesJar() } group='org.concordion' jar { manifest { attributes 'Specification-Title' : project.name, 'Implementation-Title' : project.name, 'Specification-Version' : project.version.substring(0, project.version.lastIndexOf(".")), 'Implementation-Version': project.version, 'Implementation-Vendor' : 'concordion.org', 'Specification-Vendor' : 'concordion.org', 'Created-By' : System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')', 'Built-With' : "gradle-${project.getGradle().getGradleVersion()}, groovy-${GroovySystem.getVersion()}", 'Build-Time' : String.format("%tFT% dep.name == it.artifactId.text() } }.each() { it.scope*.value = 'compile' } } } } } nexusPublishing { repositories { sonatype { username = sonatypeUsername password = sonatypePassword } } } signing { sign publishing.publications.mavenJava }