aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2019-07-17 14:39:56 +0200
committerGitHub <noreply@github.com>2019-07-17 14:39:56 +0200
commitc8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a (patch)
treeb2c7bd9df0c5d492729a6d3ff38e7db9d5e7c559 /java
parent40f0fdcdc1b6930382351571068d71c38484546d (diff)
downloadbrotli-c8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a.zip
brotli-c8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a.tar.gz
brotli-c8b37e8fd1c6cc232d5f3b8fdcfb4ab98c5cf77a.tar.bz2
Update (#762)
* put LICENSE file into .jar * fix typo * add clarification comment in PY wrapper
Diffstat (limited to 'java')
-rw-r--r--java/BUILD12
-rw-r--r--java/org/brotli/dec/BUILD1
-rw-r--r--java/org/brotli/dec/pom.xml25
-rw-r--r--java/org/brotli/wrapper/common/BUILD1
-rw-r--r--java/org/brotli/wrapper/dec/BUILD1
-rw-r--r--java/org/brotli/wrapper/enc/BUILD1
6 files changed, 41 insertions, 0 deletions
diff --git a/java/BUILD b/java/BUILD
index f7dd0c0..cd55c54 100644
--- a/java/BUILD
+++ b/java/BUILD
@@ -36,6 +36,18 @@ cc_library(
# <<< JNI headers
+genrule(
+ name = "license_resource",
+ srcs = ["@org_brotli//:LICENSE"],
+ outs = ["META-INF/LICENSE"],
+ cmd = "cp -f $< $@",
+)
+
+java_library(
+ name = "license",
+ resources = [":license_resource"],
+)
+
########################################################
# WARNING: do not (transitively) depend on this target!
########################################################
diff --git a/java/org/brotli/dec/BUILD b/java/org/brotli/dec/BUILD
index f17e512..0cc0cbf 100644
--- a/java/org/brotli/dec/BUILD
+++ b/java/org/brotli/dec/BUILD
@@ -17,6 +17,7 @@ java_library(
exclude = ["*Test*.java"],
),
proguard_specs = ["proguard.pgcfg"],
+ resource_jars = ["//:license"],
)
load(":build_defs.bzl", "brotli_java_test")
diff --git a/java/org/brotli/dec/pom.xml b/java/org/brotli/dec/pom.xml
index bf609dc..946fddf 100644
--- a/java/org/brotli/dec/pom.xml
+++ b/java/org/brotli/dec/pom.xml
@@ -133,6 +133,31 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.1.0</version>
+ <executions>
+ <execution>
+ <id>copy-license</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../../../../</directory>
+ <includes>
+ <include>LICENSE</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/java/org/brotli/wrapper/common/BUILD b/java/org/brotli/wrapper/common/BUILD
index 4f7ed84..7c3480a 100644
--- a/java/org/brotli/wrapper/common/BUILD
+++ b/java/org/brotli/wrapper/common/BUILD
@@ -18,6 +18,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
+ resource_jars = ["//:license"],
)
java_library(
diff --git a/java/org/brotli/wrapper/dec/BUILD b/java/org/brotli/wrapper/dec/BUILD
index 754541a..d1c8f5b 100644
--- a/java/org/brotli/wrapper/dec/BUILD
+++ b/java/org/brotli/wrapper/dec/BUILD
@@ -13,6 +13,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
+ resource_jars = ["//:license"],
)
java_library(
diff --git a/java/org/brotli/wrapper/enc/BUILD b/java/org/brotli/wrapper/enc/BUILD
index b3d10b9..9aea6ba 100644
--- a/java/org/brotli/wrapper/enc/BUILD
+++ b/java/org/brotli/wrapper/enc/BUILD
@@ -18,6 +18,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
+ resource_jars = ["//:license"],
)
java_library(