Skip to content

Commit

Permalink
Change package name
Browse files Browse the repository at this point in the history
This is to avoid name clash with reserved word in scala.
  • Loading branch information
kasperjj committed Aug 1, 2016
1 parent 030b2bd commit 185ffdb
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 27 deletions.
75 changes: 73 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
version = '1.0.1'
version = '1.0.2'

group = "me.doubledutch"
archivesBaseName = "lazyjson"

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'


sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand All @@ -16,10 +22,29 @@ repositories {
mavenCentral()
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

dependencies {
testCompile 'junit:junit:4.+'
testCompile 'junit:junit:4.12'
}

artifacts {
archives javadocJar, sourcesJar
}

signing {
sign configurations.archives
}


jar {
def versionFile = file('./src/main/resources/version.properties')

Expand All @@ -38,4 +63,50 @@ jar {
manifest {
attributes 'Implementation-Title': 'LazyJSON Library', 'Implementation-Version': version
}
}

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 'LazyJSON'
packaging 'jar'
// optionally artifactId can be defined here
artifactId 'lazyjson'
description 'A very fast, very lazy JSON parser for Java.'
url 'https://github.com/doubledutch/LazyJSON'

scm {
connection 'https://github.com/doubledutch/LazyJSON'
developerConnection 'https://github.com/doubledutch/LazyJSON'
url 'https://github.com/doubledutch/LazyJSON'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'kasperjj'
name 'Kasper Jeppe Jeppesen'
email 'kasper@doubledutch.me'
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

/**
* An array used to parse and inspect JSON data given in the form of a string.
Expand All @@ -18,7 +18,6 @@ public class LazyArray{
* Create a new Lazy JSON array based on the JSON representation in the given string.
*
* @param raw the input string
* @return a new LazyArray
* @throws LazyException if the string could not be parsed as a JSON array
*/
public LazyArray(String raw) throws LazyException{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

/**
* Exception used to indicate a parse or access error for LazyObject and LazyArray
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

import java.util.Iterator;

Expand All @@ -16,7 +16,6 @@ public class LazyObject{
* Create a new Lazy JSON object based on the JSON representation in the given string.
*
* @param raw the input string
* @return a new LazyObject
* @throws LazyException if the string could not be parsed as a JSON object
*/
public LazyObject(String raw) throws LazyException{
Expand All @@ -40,7 +39,7 @@ protected LazyObject(LazyToken root,char[] source){
*
* @param key the name of the field on this object
* @return a boolean value
* @throws an exception if the value for the given key was not a string.
* @throws LazyException if the value for the given key was not a string.
*/
public String getString(String key) throws LazyException{
LazyToken token=getFieldToken(key);
Expand All @@ -52,7 +51,7 @@ public String getString(String key) throws LazyException{
*
* @param key the name of the field on this object
* @return a boolean value
* @throws an exception if the value for the given key was not an integer.
* @throws LazyException if the value for the given key was not an integer.
*/
public int getInt(String key) throws LazyException{
LazyToken token=getFieldToken(key);
Expand All @@ -64,7 +63,7 @@ public int getInt(String key) throws LazyException{
*
* @param key the name of the field on this object
* @return a boolean value
* @throws an exception if the value for the given key was not a long.
* @throws LazyException if the value for the given key was not a long.
*/
public long getLong(String key) throws LazyException{
LazyToken token=getFieldToken(key);
Expand All @@ -76,7 +75,7 @@ public long getLong(String key) throws LazyException{
*
* @param key the name of the field on this object
* @return a boolean value
* @throws an exception if the value for the given key was not a double.
* @throws LazyException if the value for the given key was not a double.
*/
public double getDouble(String key) throws LazyException{
LazyToken token=getFieldToken(key);
Expand All @@ -88,7 +87,7 @@ public double getDouble(String key) throws LazyException{
*
* @param key the name of the field on this object
* @return true if the value is null, false otherwise
* @throws an exception if no value was set for the given key.
* @throws LazyException if no value was set for the given key.
*/
public boolean isNull(String key){
LazyToken token=getFieldToken(key);
Expand All @@ -101,7 +100,7 @@ public boolean isNull(String key){
*
* @param key the name of the field on this object
* @return a boolean value
* @throws an exception if the value for the given key was not a boolean.
* @throws LazyException if the value for the given key was not a boolean.
*/
public boolean getBoolean(String key){
LazyToken token=getFieldToken(key);
Expand All @@ -115,7 +114,7 @@ public boolean getBoolean(String key){
*
* @param key the name of the field on this object
* @return an array value
* @throws an exception if the value for the given key was not an object.
* @throws LazyException if the value for the given key was not an object.
*/
public LazyObject getJSONObject(String key) throws LazyException{
LazyToken token=getFieldToken(key);
Expand All @@ -128,7 +127,7 @@ public LazyObject getJSONObject(String key) throws LazyException{
*
* @param key the name of the field on this object
* @return an array value
* @throws an exception if the value for the given key was not an array.
* @throws LazyException if the value for the given key was not an array.
*/
public LazyArray getJSONArray(String key) throws LazyException{
LazyToken token=getFieldToken(key);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

import java.util.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

import java.util.*;

Expand Down Expand Up @@ -165,7 +165,7 @@ protected static LazyToken cValueNull(int index){
*
* @param source the source character array for this token
* @return the integer value if it could be parsed
* @throws an exception if the value could not be parsed
* @throws LazyException if the value could not be parsed
*/
protected int getIntValue(char[] source) throws LazyException{
int i=startIndex;
Expand All @@ -192,7 +192,7 @@ protected int getIntValue(char[] source) throws LazyException{
*
* @param source the source character array for this token
* @return the long value if it could be parsed
* @throws an exception if the value could not be parsed
* @throws LazyException if the value could not be parsed
*/
protected long getLongValue(char[] source) throws LazyException{
int i=startIndex;
Expand All @@ -219,7 +219,7 @@ protected long getLongValue(char[] source) throws LazyException{
*
* @param source the source character array for this token
* @return the double value if it could be parsed
* @throws an exception if the value could not be parsed
* @throws LazyException if the value could not be parsed
*/
protected double getDoubleValue(char[] source) throws LazyException{
String str=getStringValue(source);
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Thu Jul 28 14:07:20 PDT 2016
BUILD_VERSION=1.0.1
BUILD_DATE=2016-07-28T21\:07\:20Z
BUILD_NUMBER=76
#Mon Aug 01 13:54:56 PDT 2016
BUILD_VERSION=1.0.2
BUILD_DATE=2016-08-01T20\:54\:56Z
BUILD_NUMBER=99
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

import java.io.File;
import org.junit.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

import java.io.File;
import org.junit.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.doubledutch.lazy;
package me.doubledutch.lazyjson;

import java.io.File;
import org.junit.*;
Expand Down

0 comments on commit 185ffdb

Please sign in to comment.