Select Git revision
build.gradle
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
build.gradle 2.44 KiB
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'signing'
project.version = '3.2.14-SNAPSHOT'
project.group = 'de.hhu.stups'
project.archivesBaseName = "sablecc"
wrapper {
gradleVersion = "6.3"
distributionType = Wrapper.DistributionType.ALL
}
final isSnapshot = project.version.endsWith("-SNAPSHOT")
sourceCompatibility = 7
targetCompatibility = 7
repositories {
mavenLocal()
jcenter()
}
mainClassName = "org.sablecc.sablecc.SableCC"
java {
withSourcesJar()
withJavadocJar()
}
jar {
manifest {
attributes 'Main-Class': mainClassName
}
}
task writeVersion() {
doFirst {
def buildconstants_class = """
package org.sablecc.sablecc;
public class Version
{
public static final String VERSION = "${project.version}";
}
"""
File f = file("src/main/java/org/sablecc/sablecc/Version.java")
f.delete()
f << buildconstants_class
}
}
compileJava {
dependsOn = ['writeVersion']
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'SableCC - Stups fork'
description = 'This version of SableCC enriches the abstract syntax tree with information about tokens.'
url = 'https://github.com/bendisposto/sablecc-stups'
licenses {
license {
name = 'GNU Lesser General Public License, Version 2.1'
url = 'http://www.gnu.org/licenses/lgpl-2.1.html'
}
}
scm {
connection = 'scm:git:git://github.com/bendisposto/sablecc-stups.git'
developerConnection = 'scm:git:git@github.com:bendisposto/sablecc-stups.git'
url = 'https://github.com/bendisposto/sablecc-stups'
}
developers {
developer {
id = 'bendisposto'
name = 'Jens Bendisposto'
email = 'jens@bendisposto.de'
}
}
}
}
}
repositories {
maven {
final releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
final snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url isSnapshot ? snapshotsRepoUrl : releasesRepoUrl
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
credentials {
username project.ossrhUsername
password project.ossrhPassword
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}