diff --git a/build.gradle b/build.gradle index 2b44f6227418ad2e2735fd92c48d4b5b353e52a7..b3ea1ca6d8aac8771c507600cc032aed688f4459 100644 --- a/build.gradle +++ b/build.gradle @@ -1,30 +1,91 @@ apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'maven' +apply plugin: 'signing' -project.version = '3.2.9-SNAPSHOT' -project.group = 'de.stups' +project.version = '3.2.10' +project.group = 'de.hhu.stups' +project.archivesBaseName = "sablecc" + allprojects { sourceCompatibility = 1.5 targetCompatibility = 1.5 } -repositories { - maven { - name "cobra" - url "http://cobra.cs.uni-duesseldorf.de/artifactory/repo" - } -} - dependencies { testCompile 'junit:junit:4.8.2' } -task deploy(dependsOn: [jar,test,javadoc], group: 'Build') + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +signing { + sign configurations.archives +} jar { manifest { attributes 'Main-Class': 'org.sablecc.sablecc.SableCC' } } + +artifacts { + archives javadocJar, sourcesJar +} + +task deploy(dependsOn: [jar,test,javadoc], group: 'Build') + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + pom.project { + name 'SableCC - Stups fork' + packaging 'jar' + // optionally artifactId can be defined here + 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' + } + } + } + } + } +} diff --git a/src/main/java/org/sablecc/sablecc/Inlining.java b/src/main/java/org/sablecc/sablecc/Inlining.java index ae8979d74fd7c405d61f62c70c7020785b918eac..a1361eda85327063dbbe6a6661a53e41d79e36f3 100644 --- a/src/main/java/org/sablecc/sablecc/Inlining.java +++ b/src/main/java/org/sablecc/sablecc/Inlining.java @@ -76,7 +76,7 @@ public class Inlining if(prodMustBeInlined.getValue()) { /* - Once we detect that the production can be inline, + Once we detect that the production can be inline, we try to inline each of its alternatives. */ LinkedList listOfAlts = new TypedLinkedList(NodeCast.instance); @@ -150,7 +150,7 @@ public class Inlining return inlinedAlternatives; } - /***************************************************************** + /* boolean containsDoubloons(List aList) { AAlt[] alts = (AAlt [])aList.toArray(new AAlt[0]); @@ -176,9 +176,9 @@ public class Inlining } } } - return false; + return false; } - /*****************************************************************/ + */ /* * Inlining of an alternative diff --git a/src/main/java/org/sablecc/sablecc/Version.java b/src/main/java/org/sablecc/sablecc/Version.java index c835fb3372f77ad068543bda1aee4f2d415dd95a..2942ec731dc5f015a0c8727f1092b2e053e74d83 100644 --- a/src/main/java/org/sablecc/sablecc/Version.java +++ b/src/main/java/org/sablecc/sablecc/Version.java @@ -2,5 +2,5 @@ package org.sablecc.sablecc; public class Version { - public static final String VERSION = "3.2"; + public static final String VERSION = "3.2.10"; }