From 444832a40e608474fa7b8da16c5845be04da6c17 Mon Sep 17 00:00:00 2001 From: gudzpoz Date: Tue, 28 May 2024 00:31:37 +0800 Subject: [PATCH] Add getting started paragraph And fix typos and bundled license --- docs/console.md | 4 +-- docs/getting-started.md | 13 ++++++--- docs/jpms.md | 2 +- .../main/resources/META-INF/LICENSE-luajava | 28 +++++++++++++++++++ 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/docs/console.md b/docs/console.md index 4a11711f..73a895b5 100644 --- a/docs/console.md +++ b/docs/console.md @@ -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. @@ -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. diff --git a/docs/getting-started.md b/docs/getting-started.md index 42861161..96b90785 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -43,11 +43,11 @@ to get things work. -## 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. @@ -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`. @@ -74,7 +74,7 @@ dependencies { } ``` -### Using a really lengthy configuration +#### Using a really lengthy configuration ```groovy android { @@ -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! diff --git a/docs/jpms.md b/docs/jpms.md index 0ad01e69..dacba3c5 100644 --- a/docs/jpms.md +++ b/docs/jpms.md @@ -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 { diff --git a/luajava/src/main/resources/META-INF/LICENSE-luajava b/luajava/src/main/resources/META-INF/LICENSE-luajava index 23de3299..ae30463f 100644 --- a/luajava/src/main/resources/META-INF/LICENSE-luajava +++ b/luajava/src/main/resources/META-INF/LICENSE-luajava @@ -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: ] @@ -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: ] @@ -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. +