Skip to content

Commit

Permalink
preparation for maven release
Browse files Browse the repository at this point in the history
  • Loading branch information
dorians committed Apr 2, 2015
1 parent 4e4a859 commit db083c3
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 43 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ Supported languages
Usage
-----

Add `tradukisto` as dependency:

```
repositories {
mavenCentral()
}
dependencies {
compile 'pl.allegro.finance:tradukisto:0.1.0'
}
```

and use it:

```java
ValueConverter converter = ValueConverters.POLISH_INTEGER;
String valueAsWords = converter.asWords(1_234);
Expand Down
58 changes: 47 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.1"
}
}

plugins {
id 'java'
id 'groovy'
id 'maven-publish'
id 'idea'
id 'checkstyle'
id 'jacoco'
id 'pmd'
id 'pl.allegro.tech.build.axion-release' version '1.2.3'
id "com.bmuschko.nexus" version "2.3.1"
}

apply plugin: 'io.codearte.nexus-staging'

scmVersion {
tag {
prefix = 'tradukisto'
}
}

project.version = scmVersion.version
project.group = "pl.allegro.finance"

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -40,19 +60,35 @@ test {
}
}

scmVersion {
tag {
prefix = 'tradukisto'
}
nexusStaging {
packageGroup = "pl.allegro"
}

project.version = scmVersion.version
modifyPom {
project {
name 'Tradukisto'
description 'Small java library created to convert numbers to their word representations'
url 'https://github.com/allegro/tradukisto'
inceptionYear '2015'

scm {
url 'https://github.com/allegro/tradukisto'
connection 'scm:git@github.com:allegro/tradukisto.git'
developerConnection 'scm:git@github.com:allegro/tradukisto.git'
}

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

publishing {
publications {
maven(MavenPublication) {
groupId 'pl.allegro.utils'
from components.java
developers {
developer {
id 'dorians'
name 'Dorian Sarnowski'
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package pl.allegro.utils.tradukisto;
package pl.allegro.finance.tradukisto;

import pl.allegro.utils.tradukisto.internal.BigDecimalToStringConverter;
import pl.allegro.finance.tradukisto.internal.BigDecimalToStringConverter;

import java.math.BigDecimal;

import static com.google.common.base.Verify.verifyNotNull;
import static pl.allegro.utils.tradukisto.internal.languages.polish.PolishContainer.polishContainer;
import static pl.allegro.finance.tradukisto.internal.languages.polish.PolishContainer.polishContainer;

public enum MoneyConverters {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package pl.allegro.utils.tradukisto;
package pl.allegro.finance.tradukisto;

import pl.allegro.utils.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.finance.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.finance.tradukisto.internal.languages.polish.PolishContainer;

import static com.google.common.base.Verify.verifyNotNull;
import static pl.allegro.utils.tradukisto.internal.languages.polish.PolishContainer.polishContainer;

public enum ValueConverters {

POLISH_INTEGER(polishContainer().getNumbersConverter());
POLISH_INTEGER(PolishContainer.polishContainer().getNumbersConverter());

private IntegerToStringConverter converter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal;
package pl.allegro.finance.tradukisto.internal;

import java.math.BigDecimal;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal;
package pl.allegro.finance.tradukisto.internal;

public interface IntegerToStringConverter {
String asWords(Integer value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal;
package pl.allegro.finance.tradukisto.internal;

import com.google.common.math.IntMath;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import pl.allegro.utils.tradukisto.internal.BigDecimalToStringConverter;
import pl.allegro.utils.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.finance.tradukisto.internal.BigDecimalToStringConverter;
import pl.allegro.finance.tradukisto.internal.IntegerToStringConverter;

import java.math.BigDecimal;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import com.google.common.collect.Range;
import pl.allegro.utils.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.finance.tradukisto.internal.IntegerToStringConverter;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import pl.allegro.utils.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.utils.tradukisto.internal.NumberChunking;
import pl.allegro.finance.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.finance.tradukisto.internal.NumberChunking;

import java.util.ArrayList;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import com.google.common.collect.ImmutableMap;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import pl.allegro.utils.tradukisto.internal.BigDecimalToStringConverter;
import pl.allegro.utils.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.utils.tradukisto.internal.NumberChunking;
import pl.allegro.finance.tradukisto.internal.BigDecimalToStringConverter;
import pl.allegro.finance.tradukisto.internal.IntegerToStringConverter;
import pl.allegro.finance.tradukisto.internal.NumberChunking;

public final class PolishContainer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import com.google.common.collect.Range;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto
package pl.allegro.finance.tradukisto

import com.google.common.base.VerifyException
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto
package pl.allegro.finance.tradukisto

import com.google.common.base.VerifyException
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal
package pl.allegro.finance.tradukisto.internal

import spock.lang.Specification

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pl.allegro.utils.tradukisto.internal.languages.polish;
package pl.allegro.finance.tradukisto.internal.languages.polish;

import spock.lang.Specification

import static pl.allegro.utils.tradukisto.internal.languages.polish.PolishContainer.polishContainer
import static PolishContainer.polishContainer

class BigDecimalToPolishBankingMoneyValueConverterTest extends Specification {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal.languages.polish
package pl.allegro.finance.tradukisto.internal.languages.polish

import spock.lang.Specification
import spock.lang.Unroll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal.languages.polish
package pl.allegro.finance.tradukisto.internal.languages.polish

import spock.lang.Specification
import spock.lang.Unroll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.allegro.utils.tradukisto.internal.languages.polish
package pl.allegro.finance.tradukisto.internal.languages.polish

import spock.lang.Specification
import spock.lang.Unroll
Expand Down

0 comments on commit db083c3

Please # to comment.