spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
732 stars 396 forks source link

Remove guava dependency #95

Closed tttomat19 closed 7 years ago

tttomat19 commented 8 years ago

1) Guava is used only in one class: org.springframework.shell.support.table.TableRenderer 2) Only in 2 places in that class use guava:

Iterable<String> chunks = Splitter.fixedLength(
header.getWidth()).split(header.getName());

(both use same Splitter.fixedLength) and later it is used in foreach loop. 3) Guava is 2.3 mb large

4) I believe it can be replaced with something dumb as this: https://gist.github.com/tttomat19/05bb30756252fb1fac07247c68caac00

ghost commented 7 years ago

I just looked at the source and it is practically no longer used, only in the build files.

spring-shell (master) $ grep -R guava .
./build.gradle:    compile "com.google.guava:guava:$guavaVersion"
./gradle.properties:guavaVersion=17.0

So, I excluded it like this as a workaround:

    compile('org.springframework.shell:spring-shell:1.2.0.RELEASE') {
        exclude group: 'com.google.guava'
    }