Skip to content

Commit

Permalink
Fix problem with using Java 11 and later
Browse files Browse the repository at this point in the history
This also removed the requirement to add java.xml.bind in Java 9 and later
  • Loading branch information
IGJoshua committed Mar 1, 2019
1 parent e6d66fa commit b5c7d21
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Discljord follows semantic versioning.

## [Unreleased]

## [0.2.2] - 2019-03-01
### Fixed
- http-kit HTTP requests would break on java 11

### Removed
- Unnecessary dependency on clojure.tools.logging

## [0.2.1] - 2019-02-27
### Changed
- Spec for files to be used with create-message! now requires a file rather than any?
Expand Down Expand Up @@ -109,7 +116,8 @@ Discljord follows semantic versioning.
- README follows new API
- Project name from `discljord-functional` to `discljord`

[Unreleased]: https://github.com/IGJoshua/discljord/compare/0.2.1..develop
[Unreleased]: https://github.com/IGJoshua/discljord/compare/0.2.2..develop
[0.2.2]: https://github.com/IGJoshua/discljord/compare/0.2.1..0.2.2
[0.2.1]: https://github.com/IGJoshua/discljord/compare/0.2.0..0.2.1
[0.2.0]: https://github.com/IGJoshua/discljord/compare/0.1.7..0.2.0
[0.1.7]: https://github.com/IGJoshua/discljord/compare/0.1.6..0.1.7
Expand Down
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Discljord is a library for the easy creation of Discord Bots in Clojure! It work
Add the following to your project.clj in leiningen:

```clojure
[org.suskalo/discljord "0.2.1"]
[org.suskalo/discljord "0.2.2"]
```

## Usage
Expand All @@ -18,18 +18,6 @@ lein deps
```
After that, discljord should be ready to go, and you can start building a bot!

#### Java 9 and Later

Discljord on Java 9 and later makes use of libraries that internally use the java module `java.xml.bind`. If you are on Java 9 or later and are experiencing `ClassNotFoundException`s for classes in the `java.xml.bind` package, then you will need to pass `--add-modules java.xml.bind` to the JVM when you run your bot.

Lein example:
```clojure
(defproject example
:dependencies [[org.clojure/clojure "1.10.0"]
[org.suskalo/discljord "0.2.1"]]
:jvm-opts ["--add-modules" "java.xml.bind"])
```

### Basic Bot Construction

Bots in discljord are applications which consist of three separate processes. First is the connection on which Discord sends information to the bot. Second is an event handler which takes care of all the events sent to it by Discord. Third is a messaging process which takes messages the event handler (or other sources) want to send, and sends it to Discord, respecting rate limits.
Expand Down
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject org.suskalo/discljord "0.2.1"
(defproject org.suskalo/discljord "0.2.2"
:description " A Clojure wrapper library for the Discord API, with full API coverage (except voice, for now), and high scalability."
:url "https://github.com/IGJoshua/discljord"
:license {:name "Eclipse Public License"
Expand All @@ -7,7 +7,7 @@
[org.clojure/core.async "0.4.490"]
[org.clojure/data.json "0.2.6"]
[com.taoensso/timbre "4.10.0"]
[http-kit "2.2.0"]
[http-kit "2.4.0-alpha3"]
[stylefruits/gniazdo "1.0.1"]
[com.rpl/specter "1.1.1"]]
:target-path "target/%s"
Expand Down
2 changes: 1 addition & 1 deletion src/discljord/messaging/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
(str "DiscordBot ("
"https://github.com/IGJoshua/discljord"
", "
"0.2.1"
"0.2.2"
") "
user-agent)
"Content-Type" "application/json"})
Expand Down

0 comments on commit b5c7d21

Please sign in to comment.