a.b.z.Target
a.b.Hi
a.b.c.Hello
jar {
exclude("a/b/**")
include("a/b/z/**")
}
If I use include, nothing in jar file…
I want to put only “a/b/z/**” files to jar file…
a.b.z.Target
a.b.Hi
a.b.c.Hello
jar {
exclude("a/b/**")
include("a/b/z/**")
}
If I use include, nothing in jar file…
I want to put only “a/b/z/**” files to jar file…
Iirc, things are only included if you include them and do not exclude them.
As you include and exclude those files, they are then excluded.
But if you simply remove the exclude it should work, I think.
so… how to solve this problem?
100+ package under “a/b/”…
and I cant remove exclude…
Why can’t you remove the exclude?
If you have an include, only the included will be included.
Hence I said remove the exclude and you should have the intended result.
I need exclude for other package…
so, I cant remove all of exclude…
Well, you still need to write your excludes and includes in a way that the files you want are included but not excited.
You could probably use exclude { ... }
to calculate whether a file should be excluded instead of using and style pattern.