-
Notifications
You must be signed in to change notification settings - Fork 3k
Skip building empty jars #1357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip building empty jars #1357
Conversation
|
Looks great! Thanks @jzhuge! |
|
@jzhuge Did you find that the intellij IDE could not import the relocated guava classes after applied this patch ? Once applied this patch in my own repo, the relocated package (such as |
|
The simple pr (#1360) fixed my package import issue, but i'm not familiar with gradle building, is it the right direction to fix this issue ? |
|
Confirmed what you saw. Very strange. Anybody know why?
Your PR LGTM.
…On Wed, Aug 19, 2020 at 11:51 PM openinx ***@***.***> wrote:
The simple pr (#1360 <#1360>) fixed
my package import issue, but i'm not familiar with gradle building, is it
the right direction to fix this issue ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1357 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOL5JCD4G47Z73NASBYYLDSBTBWZANCNFSM4QEBJXYQ>
.
--
John Zhuge
|
|
There's a public class GuavaClasses {
/*
* Referencing Guava classes here includes them in the minimized and relocated Guava jar
*/
static {
VisibleForTesting.class.getName();
Joiner.class.getName();
MoreObjects.class.getName();
Objects.class.getName();
Preconditions.class.getName();
Splitter.class.getName();
Throwables.class.getName();
BiMap.class.getName();
FluentIterable.class.getName();
ImmutableBiMap.class.getName();
ImmutableList.class.getName();
ImmutableMap.class.getName();
ImmutableSet.class.getName();
Iterables.class.getName();
Iterators.class.getName();
ListMultimap.class.getName();
Lists.class.getName();
MapMaker.class.getName();
Maps.class.getName();
Multimap.class.getName();
Multimaps.class.getName();
Ordering.class.getName();
Sets.class.getName();
Streams.class.getName();
Hasher.class.getName();
HashFunction.class.getName();
Hashing.class.getName();
Files.class.getName();
Bytes.class.getName();
MoreExecutors.class.getName();
ThreadFactoryBuilder.class.getName();
Iterables.class.getName();
}
} |
|
The dependency on bundled-guava is declared using the following syntax
(suggested by Shadow Plugin doc):
compile project(path: ':iceberg-bundled-guava', configuration: 'shadow')
Maybe Idea does not interpret it properly?
…On Thu, Aug 20, 2020 at 1:06 AM openinx ***@***.***> wrote:
There's a GuavaClasses inside the empty jar. Without that class, then
bundled-guava won't reference any classes from guava ? finally, the
relocate won't have effect in this module. But I don't understand why could
we build this project in terminal.
public class GuavaClasses {
/* * Referencing Guava classes here includes them in the minimized and relocated Guava jar */
static {
VisibleForTesting.class.getName();
Joiner.class.getName();
MoreObjects.class.getName();
Objects.class.getName();
Preconditions.class.getName();
Splitter.class.getName();
Throwables.class.getName();
BiMap.class.getName();
FluentIterable.class.getName();
ImmutableBiMap.class.getName();
ImmutableList.class.getName();
ImmutableMap.class.getName();
ImmutableSet.class.getName();
Iterables.class.getName();
Iterators.class.getName();
ListMultimap.class.getName();
Lists.class.getName();
MapMaker.class.getName();
Maps.class.getName();
Multimap.class.getName();
Multimaps.class.getName();
Ordering.class.getName();
Sets.class.getName();
Streams.class.getName();
Hasher.class.getName();
HashFunction.class.getName();
Hashing.class.getName();
Files.class.getName();
Bytes.class.getName();
MoreExecutors.class.getName();
ThreadFactoryBuilder.class.getName();
Iterables.class.getName();
}
}
[image: image]
<https://user-images.githubusercontent.com/5028729/90732685-0adc4600-e2fe-11ea-9009-875ef9a40a8d.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1357 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOL5JFXRDLHZQ2QNMN2JULSBTKRNANCNFSM4QEBJXYQ>
.
--
John Zhuge
|
|
Looks like IntelliJ relies on the 'empty' classifier somehow. Probably not worth the trouble to find out why when we can just add the classifier back. I've updated the PR to use |

Skip building the empty jars that we don't need.
Verified the shadow jars still built and no empty jars.