Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,32 @@ If you want to download the library manually, head on over to the [Releases page
Import `com.gauck.sam.Utilities.*;`

The main `Utilities` class should be used similarly to `java.lang.Math`. This means that users should call its static methods and not try to instantiate.

## Common Errors
### NoClassDefFoundError (Gradle)
If your stack trace looks like this: (the `at` lines will be different)
```
Exception in thread "main" java.lang.NoClassDefFoundError: com/gauck/sam/Utilities/Utilities
at com.samgauck.CityManagement.Economy.<init>(Economy.java:14)
at com.samgauck.CityManagement.Economy.getInstance(Economy.java:29)
at com.samgauck.CityManagement.Command.<init>(Command.java:23)
at com.samgauck.CityManagement.Command.getInstance(Command.java:46)
at com.samgauck.CityManagement.Main.<clinit>(Main.java:44)
Caused by: java.lang.ClassNotFoundException: com.gauck.sam.Utilities.Utilities
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more
```
add the line
```
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
```
to the jar block. However, this may cause this error:
```
Cannot change dependencies of configuration ':compile' after it has been resolved
```
In order to fix this, ensure that your dependencies block is before your jar block (and if you have a repositories block, that should be first).

See https://github.com/Samasaur1/CityManagement/issues/37 and https://github.com/Samasaur1/Utilities/issues/10
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group 'com.gauck.sam'
version '1.4.0'
version '1.4.1'

sourceCompatibility = 1.8

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists