From 7dbc2a3adb56d38a7153a6d7dff57b094cfa7066 Mon Sep 17 00:00:00 2001 From: Jens Bendisposto <jens@bendisposto.de> Date: Thu, 30 Jul 2015 20:35:38 +0200 Subject: [PATCH] prepare to push to central --- build.gradle | 81 ++++++++++++++++--- .../java/org/sablecc/sablecc/Inlining.java | 8 +- .../java/org/sablecc/sablecc/Version.java | 2 +- 3 files changed, 76 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 2b44f62..b3ea1ca 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 ae8979d..a1361ed 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 c835fb3..2942ec7 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"; } -- GitLab