* put LICENSE file into .jar
 * fix typo
 * add clarification comment in PY wrapper
This commit is contained in:
Eugene Kliuchnikov 2019-07-17 14:39:56 +02:00 committed by GitHub
parent 40f0fdcdc1
commit c8b37e8fd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 10 deletions

View File

@ -263,7 +263,7 @@ static Command ParseParams(Context* params) {
return COMMAND_HELP;
} else if (c == 'j' || c == 'k') {
if (keep_set) {
fprintf(stderr, "argument --rm / -j or --keep / -n already set\n");
fprintf(stderr, "argument --rm / -j or --keep / -k already set\n");
return COMMAND_INVALID;
}
keep_set = BROTLI_TRUE;
@ -388,7 +388,7 @@ static Command ParseParams(Context* params) {
return COMMAND_HELP;
} else if (strcmp("keep", arg) == 0) {
if (keep_set) {
fprintf(stderr, "argument --rm / -j or --keep / -n already set\n");
fprintf(stderr, "argument --rm / -j or --keep / -k already set\n");
return COMMAND_INVALID;
}
keep_set = BROTLI_TRUE;
@ -401,7 +401,7 @@ static Command ParseParams(Context* params) {
params->copy_stat = BROTLI_FALSE;
} else if (strcmp("rm", arg) == 0) {
if (keep_set) {
fprintf(stderr, "argument --rm / -j or --keep / -n already set\n");
fprintf(stderr, "argument --rm / -j or --keep / -k already set\n");
return COMMAND_INVALID;
}
keep_set = BROTLI_TRUE;

View File

@ -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!
########################################################

View File

@ -17,6 +17,7 @@ java_library(
exclude = ["*Test*.java"],
),
proguard_specs = ["proguard.pgcfg"],
resource_jars = ["//:license"],
)
load(":build_defs.bzl", "brotli_java_test")

View File

@ -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>

View File

@ -18,6 +18,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
resource_jars = ["//:license"],
)
java_library(

View File

@ -13,6 +13,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
resource_jars = ["//:license"],
)
java_library(

View File

@ -18,6 +18,7 @@ java_library(
["*.java"],
exclude = ["*Test*.java"],
),
resource_jars = ["//:license"],
)
java_library(

View File

@ -703,13 +703,14 @@ PyDoc_STRVAR(brotli_doc, "Implementation module for the Brotli library.");
static struct PyModuleDef brotli_module = {
PyModuleDef_HEAD_INIT,
"_brotli",
brotli_doc,
0,
brotli_methods,
NULL,
NULL,
NULL
"_brotli", /* m_name */
brotli_doc, /* m_doc */
0, /* m_size */
brotli_methods, /* m_methods */
NULL, /* m_reload */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL /* m_free */
};
#else
#define INIT_BROTLI init_brotli