Skip to content

Commit 800e11a

Browse files
Merge pull request #18 from ChillyCheesy/dev
Dev
2 parents 4246f0c + 5bb263f commit 800e11a

File tree

214 files changed

+3229
-6103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+3229
-6103
lines changed

.github/workflows/app-build.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 🌶 App build
1+
name: App build 🌶
22

33
on:
44
push:
@@ -8,14 +8,14 @@ on:
88

99
jobs:
1010
build_app:
11-
name: Build app and deploy 🪶
11+
name: 🪶 Build app and deploy
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-java@v2
1616
with:
1717
distribution: 'zulu'
18-
java-version: '11'
18+
java-version: '16'
1919
- name: Setup properties SNAPSHOT
2020
if: github.ref == 'refs/heads/dev'
2121
run: |
@@ -62,15 +62,19 @@ jobs:
6262
6363
deploy_javadoc:
6464
if: github.ref == 'refs/heads/dev'
65-
name: Deploy javadoc 📄
65+
name: 📄 Deploy javadoc
6666
runs-on: ubuntu-latest
6767
steps:
6868
- uses: actions/checkout@v3
69+
- uses: actions/setup-java@v2
70+
with:
71+
distribution: 'zulu'
72+
java-version: '16'
6973
- name: Build javadoc
7074
run: |
7175
chmod +x gradlew
7276
./gradlew clean :modulo-api:javadoc
73-
- name: Deploy Javadoc 🚀
77+
- name: 🚀 Deploy Javadoc
7478
uses: JamesIves/github-pages-deploy-action@v4.3.3
7579
with:
7680
branch: gh-pages

README.md

Lines changed: 105 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22

33
# Modulo
4-
[![Build App](https://github.com/ChillyCheesy/Modulo/actions/workflows/app-build.yml/badge.svg?branch=master)]()
4+
[![Build App](https://github.com/ChillyCheesy/Modulo/actions/workflows/app-build.yml/badge.svg?branch=master)](https://github.com/ChillyCheesy/Modulo/actions)
55
[![maven-central](https://maven-badges.herokuapp.com/maven-central/com.chillycheesy/modulo-api/badge.svg?style=flat)](https://search.maven.org/artifact/com.chillycheesy/modulo-api)
66
[![Release](https://img.shields.io/github/v/release/ChillyCheesy/modulo.svg)](https://github.com/ChillyCheesy/Modulo/releases)
77

@@ -10,9 +10,9 @@
1010

1111
<div align="center">
1212

13-
![License](https://img.shields.io/github/license/ChillyCheesy/Modulo.svg)
14-
![Stars](https://img.shields.io/github/stars/ChillyCheesy/modulo.svg)
15-
![Forks](https://img.shields.io/github/forks/chillycheesy/modulo.svg)
13+
[![License](https://img.shields.io/github/license/ChillyCheesy/Modulo.svg)](https://github.com/ChillyCheesy/Modulo/blob/master/LICENSE.md)
14+
[![Stars](https://img.shields.io/github/stars/ChillyCheesy/modulo.svg)](https://github.com/ChillyCheesy/Modulo/stargazers)
15+
[![Forks](https://img.shields.io/github/forks/chillycheesy/modulo.svg)](https://github.com/ChillyCheesy/Modulo/network/members)
1616

1717
</div>
1818

@@ -21,27 +21,120 @@
2121
## Table of contents
2222
* [Description](#Description)
2323
* [Getting started](#GettingStarted)
24+
* [Step 1](#GettingStarted-1)
25+
* [Step 2](#GettingStarted-2)
26+
* [Step 3](#GettingStarted-3)
27+
* [Step 4](#GettingStarted-4)
28+
* [Step 5](#GettingStarted-5)
2429
* [How to use it](#HowToUseIt)
2530
* [See also](#SeeAlso)
2631
* [Cute cats](https://www.youtube.com/watch?v=VZrDxD0Za9I)
2732

28-
## Description 🐭 <a id="Description"></a>
33+
## 🐭 Description <a id="Description"></a>
2934
What is modulo...
35+
## 🚀 Getting started <a id="GettingStarted"></a>
36+
**How to use Modulo ?**
37+
### Step 1:<a id="GettingStarted-1"></a>
38+
* Create a new java project in your favorite IDE.
39+
* Add the modulo-api dependency to your project.
40+
* Manually with your IDE.
41+
* With Maven add the following dependency to your pom.xml:
42+
```xml
43+
<dependency>
44+
<groupId>com.chillycheesy</groupId>
45+
<artifactId>modulo-api</artifactId>
46+
<version>0.1.2</version>
47+
</dependency>
48+
```
49+
* With Gradle add the following dependency to your build.gradle: *(recommended)*
50+
```gradle
51+
dependencies {
52+
implementation 'com.chillycheesy:modulo-api:0.1.2'
53+
}
54+
```
55+
### Step 2:<a id="GettingStarted-2"></a>
56+
* Create a new java class in your project. The class must inherit from the Module class. This will become your main class.
57+
* Implement the needed methods.
58+
```java
59+
package com.chillycheesy.modulo;
60+
61+
import com.chillycheesy.modulo.modules.Module;
62+
63+
public class HelloModule extends Module {
64+
65+
@Override
66+
protected void onLoad() {
67+
info("HelloModule is loaded");
68+
}
69+
70+
@Override
71+
protected void onStart() {
72+
info("HelloModule is started");
73+
}
74+
75+
@Override
76+
protected void onStop() {
77+
info("HelloModule is stopped");
78+
}
79+
80+
}
81+
```
82+
### Step 3:<a id="GettingStarted-3"></a>
83+
* Create the module.yml file in your project resources folder.
84+
* The module.yml file must contain the following information:
85+
```yml
86+
name: HelloModule
87+
description: This is a hello module
88+
version: 1.0.0
89+
main: com.chillycheesy.modulo.HelloModule # The main class of the module
90+
authors:
91+
- ChillyCheesy
92+
dependencies: [] # Optional
93+
softDependencies: [] # Optional
94+
```
95+
### Step 4:<a id="GettingStarted-4"></a>
96+
* Download the [modulo-server jar file](https://github.com/ChillyCheesy/Modulo/releases).
97+
* Build your project and drop it in the ```modules``` folder inside your server folder.
98+
* run the server with the following command:
99+
```bash
100+
$> java -jar modulo-server.jar
101+
```
30102

31-
## Getting started 🚀 <a id="GettingStarted"></a>
32-
How to begin...
103+
### Step 5:<a id="GettingStarted-5"></a>
104+
**Enjoy 🌶 🧀 !**
33105

34-
## How to use it 📕 <a id="HowToUseIt"></a>
35-
See the documentation page [here](https://chillycheesy.github.io/Modulo/).
106+
*If you use gradle, you can use the [ModuloGradleApplication](https://github.com/ChillyCheesy/ModuloGradleApplication).*
107+
108+
## 📕 How to use it <a id="HowToUseIt"></a>
109+
See the Java documentation page [here](https://chillycheesy.github.io/Modulo/).
36110
You can also check the [wiki](https://github.com/ChillyCheesy/Modulo/wiki).
37111

38-
## See also 🧀🌶 <a id="SeeAlso"></a>
112+
## 🌶 🧀 See also <a id="SeeAlso"></a>
39113
* [ModuloGradleApplication](https://github.com/ChillyCheesy/ModuloGradleApplication)
40114

41115
<pre>
42116
..----.._ _
43117
.' .--. "-.(O)_
44-
<font color="red">'-.__.-'"'=:</font>| , _)_ \__ . c\'-..
118+
'-.__.-'"'=:| , _)_ \__ . c\'-..
45119
''------'---''---'-"
46120
Despelette was here !
47-
</pre>
121+
</pre>
122+
123+
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ allprojects {
99
}
1010
}
1111

12-
task clean {
12+
tasks.register('clean') {
1313
subprojects.forEach { project ->
1414
finalizedBy ":$project.name:clean"
1515
}
1616
}
17+
18+
tasks.findByPath(':modulo-server:compileJava').dependsOn ':sand-box:deployToTestServer'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
modulo_modulename=ModuloServer
2-
modulo_version=BINKS-0.1.2
2+
modulo_version=BINKS-0.3.0

modulo-api/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
src/main/resources/hometracker-ui
2-
src/main/resources/module.yml
1+
build
32
gradle.properties

modulo-api/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ plugins {
44
}
55

66
archivesBaseName = 'modulo-api'
7-
sourceCompatibility = 11
7+
8+
sourceCompatibility = 16
9+
targetCompatibility = JavaVersion.VERSION_16
810

911
dependencies {
1012
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3'
@@ -21,6 +23,10 @@ java {
2123
withJavadocJar()
2224
}
2325

26+
compileJava {
27+
options.compilerArgs << '-parameters'
28+
}
29+
2430
test {
2531
useJUnitPlatform()
2632
}

modulo-api/src/main/java/com/chillycheesy/modulo/ModuloAPI.java

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package com.chillycheesy.modulo;
22

3-
import com.chillycheesy.modulo.commands.CommandContainer;
43
import com.chillycheesy.modulo.events.EventContainer;
54
import com.chillycheesy.modulo.modules.ModuleContainer;
65
import com.chillycheesy.modulo.pages.PageContainer;
76
import com.chillycheesy.modulo.signals.SignalContainer;
8-
import com.chillycheesy.modulo.utils.Log;
7+
import com.chillycheesy.modulo.utils.Logger;
98

109
/**
1110
* ModuloAPI was the Central Class of the API.
@@ -32,14 +31,9 @@ public class ModuloAPI {
3231
*/
3332
private static PageContainer page;
3433
/**
35-
* Log section.
34+
* Logger section.
3635
*/
37-
private static Log logger;
38-
39-
/**
40-
* Command Section
41-
*/
42-
private static CommandContainer command;
36+
private static Logger logger;
4337

4438
/**
4539
* Getter for Module logic section.
@@ -82,17 +76,8 @@ public static PageContainer getPage() {
8276
*
8377
* @return The Logger section.
8478
*/
85-
public static Log getLogger() {
86-
return logger = logger == null ? new Log(getEvent()) : logger;
87-
}
88-
89-
/**
90-
* Getter for Command logic section.
91-
*
92-
* @return The Command section.
93-
*/
94-
public static CommandContainer getCommand() {
95-
return command = command == null ? new CommandContainer() : command;
79+
public static Logger getLogger() {
80+
return logger = logger == null ? new Logger(getEvent()) : logger;
9681
}
9782

9883
}

0 commit comments

Comments
 (0)