Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# neo-devpack-java #

Java artifact for developing smart contracts in Java. Artifact has no other 3th party dependencies.

## Usage ##

In your maven pom.xml add dependency.

```xml
<dependency>
<groupId>org.neo</groupId>
<artifactId>neo-devpack-java</artifactId>
<version>2.3.0</version>
</dependency>
```
You can use any building system. See please [maven.org](https://search.maven.org/artifact/org.neo/neo-devpack-java/2.3.0/jar).

## pom.xml example ##

Whole pom.xml example.

```xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.neo.example</groupId>
<artifactId>hello-world-smart-contract</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>My first smart contract</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.neo</groupId>
<artifactId>neo-devpack-java</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
</project>
```

## Smart contract examples ##

For more Java smart contract examples please take a look at [examples-java](https://github.com/neo-project/examples-java).
61 changes: 60 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.plugin.version>3.6.1</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.version>
<maven.javadoc.plugin.version>3.0.1</maven.javadoc.plugin.version>
<maven.source.plugin.version>3.0.1</maven.source.plugin.version>
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
<key.id>8ED566FF</key.id>
</properties>

<licenses>
Expand Down Expand Up @@ -60,6 +64,50 @@
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${key.id}</keyname>
<passphraseServerId>${key.id}</passphraseServerId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
Expand All @@ -71,4 +119,15 @@
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>