From e4cf8a0f879a4f99b93a78360f65ccfbe2bdf0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chuck=20LeDuc=20D=C3=ADaz?= Date: Sun, 11 Dec 2016 19:08:19 +0100 Subject: [PATCH 1/3] add maven pom.xml and adapt ant build to work with it --- .gitignore | 1 + build.xml | 17 ++-- pom.xml | 84 +++++++++++++++++++ ...MultibaseTests.java => MultibaseTest.java} | 2 +- 4 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 pom.xml rename src/test/java/io/ipfs/multibase/{MultibaseTests.java => MultibaseTest.java} (97%) diff --git a/.gitignore b/.gitignore index bdb6657..81be742 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.class +target/** build/** dist/** .idea/** diff --git a/build.xml b/build.xml index 0d06ea7..ad97bf6 100644 --- a/build.xml +++ b/build.xml @@ -20,7 +20,7 @@ - + @@ -37,28 +37,27 @@ - + + + + - - - - - + - + - + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3f8e7ea --- /dev/null +++ b/pom.xml @@ -0,0 +1,84 @@ + + 4.0.0 + + io.ipfs + multibase + 1.0.0 + jar + + multibase + https://github.com/multiformats/java-multibase + + + https://github.com/multiformats/java-multibase/issues + GitHub Issues + + + + https://github.com/multiformats/java-multibase + scm:git:git://github.com/multiformats/java-multibase.git + scm:git:git@github.com:multiformats/java-multibase.git + + + + + MIT License + https://github.com/multiformats/java-multiaddr/blob/master/LICENSE + repo + + + + + UTF-8 + UTF-8 + 4.12 + 1.3 + + + + + junit + junit + ${junit.version} + test + + + org.hamcrest + hamcrest-core + ${hamcrest.version} + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + true + + + + + + + diff --git a/src/test/java/io/ipfs/multibase/MultibaseTests.java b/src/test/java/io/ipfs/multibase/MultibaseTest.java similarity index 97% rename from src/test/java/io/ipfs/multibase/MultibaseTests.java rename to src/test/java/io/ipfs/multibase/MultibaseTest.java index c3671b5..362bf8e 100755 --- a/src/test/java/io/ipfs/multibase/MultibaseTests.java +++ b/src/test/java/io/ipfs/multibase/MultibaseTest.java @@ -4,7 +4,7 @@ import java.util.*; -public class MultibaseTests { +public class MultibaseTest { @Test public void base58Test() { From 30d4ccfff577592ababe52c2c0bc8415315359ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chuck=20LeDuc=20D=C3=ADaz?= Date: Sun, 11 Dec 2016 19:23:10 +0100 Subject: [PATCH 2/3] update README --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b66e1be..da1897e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # java-multibase -A Java implementation of Multibase + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) +[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](http://github.com/multiformats/multiformats) +[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) + + +A Java implementation of [Multibase](https://github.com/multiformats/multibase) ## Usage ```java @@ -8,5 +14,58 @@ String encoded = Multibase.encode(Multibase.Base.Base58BTC, data); byte[] decoded = Multibase.decode(encoded); ``` -## Compilation -To compile just run ant. +## Dependency +You can use this project by building the JAR file as specified below, or by using [JitPack](https://jitpack.io/#multiformats/java-multibase/) (also supporting Gradle, SBT, etc). + +for Maven, you can add the follwing sections to your POM.XML: +``` + + + jitpack.io + https://jitpack.io + + + + + + com.github.multiformats + java-multibase + v1.0.0 + + +``` + +## Testing + +### Ant +`ant test` + +### Maven +`mvn test` + +## Building + +### Ant +`ant dist` will build a JAR file in the `./dist` suitable for manual inclusion in a project. Dependent libraries are included in `./dist/lib`. + +### Maven +`mvn package` will build a JAR file with Maven dependency information. + +## Releasing +The version number is specified in `build.xml` and `pom.xml` and must be changed in both places in order to be accurately reflected in the JAR file manifest. A git tag must be added in the format "vx.x.x" for JitPack to work. + +## Maintainers + +Captain: [@ianopolous](https://github.com/ianopolous). + +## Contribute + +Contributions welcome. Please check out [the issues](https://github.com/multiformats/java-multibase/issues). + +Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. + +## License + +[MIT](LICENSE) © Ian Preston From 06abb301dd761f92daef871ce122e4de427f2867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chuck=20LeDuc=20D=C3=ADaz?= Date: Sun, 11 Dec 2016 19:25:07 +0100 Subject: [PATCH 3/3] update README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index da1897e..b294ede 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](http://github.com/multiformats/multiformats) [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) - A Java implementation of [Multibase](https://github.com/multiformats/multibase) ## Usage