Skip to content

Commit

Permalink
Add getting started paragraph
Browse files Browse the repository at this point in the history
And fix typos and bundled license
  • Loading branch information
gudzpoz committed May 27, 2024
1 parent dd36a59 commit 444832a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We build a tiny console application with [JLine3](https://github.com/jline/jline3) every release. You may download the `example-all.jar` from our [Release page](https://github.com/gudzpoz/luajava/releases). Or you can get the lastest snapshot from [our workflow artifacts](https://github.com/gudzpoz/luajava/actions/workflows/build-natives.yml): choose the lastest build and find the `example` artifact.

The jar bundles desktop natives with it, so you should be about to play around with it on your own computer.
The jar bundles desktop natives with it, so you should be able to play around with it on your own computer.

<ClientOnly><Asciinema :file="$withBase('/example.cast')" /></ClientOnly>

Expand All @@ -12,7 +12,7 @@ The jar bundles desktop natives with it, so you should be about to play around w

We bundle several examples with the console JAR, which you may obtain using `require`.

1. `require('luajava.ansiThreadedHelloWorld.lua')`: A simple Hello World with Java threads and Ansi printing.
1. `require('luajava.ansiThreadedHelloWorld')`: A simple Hello World with Java threads and Ansi printing.
2. `require('luajava.awtTest')()`: Sets up an AWT frame to execute Lua commands.
3. `require('luajava.simpleLuaFile')`: Executes a simple Lua file.
4. `require('luajava.swingTest')()`: Sets up a Swing frame to execute Lua commands.
Expand Down
13 changes: 9 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ to get things work.

<Matrix/>

## iOS
### iOS

(Work in progress.)

## Android
### Android

You can choose between the following two configurations. The former one uses a pre-bundled AAR archive while the latter
might give a little more flexibility.
Expand All @@ -56,7 +56,7 @@ For LuaJ bindings, you don't need a binary artifact.
However, the LuaJ library uses some Java 8 API unsupported by older Android API levels,
and you might need to configure [Android Java 8+ API Desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) in your application.

### Using bundled AAR files
#### Using bundled AAR files

The AAR archive bundles native binaries for `armeabi-v7a` `arm64-v8a` `x86` and `x86_64`.

Expand All @@ -74,7 +74,7 @@ dependencies {
}
```

### Using a really lengthy configuration
#### Using a really lengthy configuration

```groovy
android {
Expand Down Expand Up @@ -140,3 +140,8 @@ tasks.whenTaskAdded { packageTask ->
}
}
```

## Using It

After setting up the dependencies or downloading the [an interactive console](./console.md),
check out the [Lua-side `java` API](./api.md) and the [Java-side API](./java.md) to start coding!
2 changes: 1 addition & 1 deletion docs/jpms.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The [Java Platform Module System](https://en.wikipedia.org/wiki/Java_Platform_Module_System)
is a built-in way to express relationships between Java _modules_, starting from Java 9.

To use LuaJava in your Java module, simply place the follow `requires` statements in your `module-info.java`:
To use LuaJava in your Java module, simply place the following `requires` statements in your `module-info.java`:

```java ignored
module my.java.module {
Expand Down
28 changes: 28 additions & 0 deletions luajava/src/main/resources/META-INF/LICENSE-luajava
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================================================
[ LuaJava includes code from LuaJIT, which has this license statement: ]

Expand Down Expand Up @@ -142,6 +143,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

===============================================================================
[ LuaJava includes code (build-natives.yml) from LibGDX, which has this license statement: ]

Expand Down Expand Up @@ -223,3 +225,29 @@ limitations under the License.
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

===============================================================================
[ LuaJava includes code from LuaJ, which has this license statement: ]

MIT License

Copyright (c) 2007 LuaJ. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 444832a

Please sign in to comment.