This commit is contained in:
InsanusMokrassar 2021-02-17 14:57:18 +06:00
parent aeff8ac955
commit 9ae12876bb
7 changed files with 37 additions and 18 deletions

16
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: ./gradlew build

View File

@ -1,11 +0,0 @@
language: java
install: true
os: linux
dist: trusty
jdk: oraclejdk8
jobs:
include:
- stage: build
script: ./gradlew build -s

View File

@ -11,6 +11,14 @@ their dependencies
* Other fields are parameters of plugin and must be provided directly
* Example is available in the [example section](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L6-L11): here `Hello` is name of plugin and
`parameter` is its configuration parameter
* Change [params](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L12-L17):
* Any key here will be available in plugins as name of param
* Any value must contains:
* `type` to detect which one object to instantiate
* Other type parameters
* You may look into example related to database in
[config](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#13): `defaultDatabase`
is easily available in plugins as `params.database` extension
## How to launch

View File

@ -38,5 +38,6 @@ application {
kapt {
arguments {
arg("com.github.matfax.klassindex.IndexSubclasses", "dev.inmo.plagubot.Plugin")
arg("com.github.matfax.klassindex.IndexAnnotated", "dev.inmo.sdi.SDIIncluded")
}
}

View File

@ -1,12 +1,17 @@
{
"database": {
"url": "jdbc:sqlite:file:test?mode=memory&cache=shared"
},
"botToken": "1234567890:ABCDEFGHIJKLMNOP_qrstuvwxyz12345678",
"plugins": [
{
"type": "Hello",
"parameter": "Example"
}
],
"params": {
"defaultDatabase": [
"dev.inmo.plagubot.config.DatabaseConfig",
{
"url": "jdbc:sqlite:file:test?mode=memory&cache=shared"
}
]
}
}

View File

@ -3,6 +3,6 @@ org.gradle.parallel=true
kotlin.js.generate.externals=true
kotlin.incremental=true
kotlin_version=1.4.21
plagubot_version=0.0.5
kotlin_version=1.4.30
plagubot_version=0.1.0
klassindex_version=4.1.0-rc.1

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists