mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-22 14:22:39 +01:00
Wip-scalapbc (#14)
* using scalapb binary * switched to unix file separator * removed protoc compilation (because we are using precompiled scalapb
This commit is contained in:
parent
0c06f7c9f5
commit
785aa73eac
8 changed files with 43 additions and 67 deletions
|
@ -1,8 +1,4 @@
|
|||
language: scala
|
||||
before_install:
|
||||
- wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2
|
||||
- tar -xjvf protobuf-2.6.1.tar.bz2
|
||||
- cd protobuf-2.6.1 && ./configure --prefix=/usr && make && sudo make install && cd ..
|
||||
scala:
|
||||
- 2.11.7
|
||||
jdk:
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
mvn -f pom_generate_scalapb.xml package
|
||||
mkdir -p target/generated-sources/scala
|
||||
PATH=.:$PATH protoc --proto_path=src/main/protobuf --scala_out=target/generated-sources/scala src/main/protobuf/lightning.proto
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@echo off
|
||||
|
||||
call mvn -f pom_generate_scalapb.xml package
|
||||
|
||||
call mkdir target\generated-sources\scala
|
||||
|
||||
protoc --plugin=protoc-gen-scala=protoc-gen-scala.bat --proto_path=src\main\protobuf --scala_out=target\generated-sources\scala src\main\protobuf\lightning.proto
|
|
@ -16,6 +16,45 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.googlecode.maven-download-plugin</groupId>
|
||||
<artifactId>download-maven-plugin</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>download-scalapbc</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>https://github.com/trueaccord/ScalaPB/releases/download/v${scalapb.version}/scalapbc-${scalapb.version}.zip</url>
|
||||
<md5>9fef6a23b9e717c14e1bb3924ac0e156</md5>
|
||||
<unpack>true</unpack>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>mkdir-generated-sources</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<mkdir dir="${project.build.directory}/generated-sources/scala"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
|
@ -29,7 +68,8 @@
|
|||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<executable>${project.basedir}/generate${script.extension}</executable>
|
||||
<executable>${project.build.directory}/scalapbc-${scalapb.version}/bin/scalapbc${script.extension}</executable>
|
||||
<commandlineArgs>--proto_path=${project.basedir}/src/main/protobuf --scala_out=${project.build.directory}/generated-sources/scala ${project.basedir}/src/main/protobuf/lightning.proto</commandlineArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>fr.acinq</groupId>
|
||||
<artifactId>scalapb-tmp</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>com.trueaccord.scalapb.compiler.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.trueaccord.scalapb</groupId>
|
||||
<artifactId>compilerplugin_2.11</artifactId>
|
||||
<version>0.4.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1 +0,0 @@
|
|||
java -jar target/scalapb-tmp-1.0-SNAPSHOT.jar
|
|
@ -1,2 +0,0 @@
|
|||
@echo off
|
||||
java -jar target\scalapb-tmp-1.0-SNAPSHOT.jar
|
3
pom.xml
3
pom.xml
|
@ -46,6 +46,7 @@
|
|||
<akka.version>2.4.6</akka.version>
|
||||
<bitcoinlib.version>0.9.6-RC2</bitcoinlib.version>
|
||||
<acinqtools.version>1.2</acinqtools.version>
|
||||
<scalapb.version>0.4.21</scalapb.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
@ -164,7 +165,7 @@
|
|||
<dependency>
|
||||
<groupId>com.trueaccord.scalapb</groupId>
|
||||
<artifactId>scalapb-runtime_${scala.version.short}</artifactId>
|
||||
<version>0.4.21</version>
|
||||
<version>${scalapb.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
|
|
Loading…
Add table
Reference in a new issue