mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Update (#762)
* put LICENSE file into .jar * fix typo * add clarification comment in PY wrapper
This commit is contained in:
parent
40f0fdcdc1
commit
c8b37e8fd1
@ -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;
|
||||
|
12
java/BUILD
12
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!
|
||||
########################################################
|
||||
|
@ -17,6 +17,7 @@ java_library(
|
||||
exclude = ["*Test*.java"],
|
||||
),
|
||||
proguard_specs = ["proguard.pgcfg"],
|
||||
resource_jars = ["//:license"],
|
||||
)
|
||||
|
||||
load(":build_defs.bzl", "brotli_java_test")
|
||||
|
@ -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>
|
||||
|
||||
|
@ -18,6 +18,7 @@ java_library(
|
||||
["*.java"],
|
||||
exclude = ["*Test*.java"],
|
||||
),
|
||||
resource_jars = ["//:license"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
|
@ -13,6 +13,7 @@ java_library(
|
||||
["*.java"],
|
||||
exclude = ["*Test*.java"],
|
||||
),
|
||||
resource_jars = ["//:license"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
|
@ -18,6 +18,7 @@ java_library(
|
||||
["*.java"],
|
||||
exclude = ["*Test*.java"],
|
||||
),
|
||||
resource_jars = ["//:license"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user