mirror of
https://github.com/InsanusMokrassar/PlaguBotBotTemplate.git
synced 2024-11-22 07:33:47 +00:00
update
This commit is contained in:
parent
aeff8ac955
commit
9ae12876bb
16
.github/workflows/build.yml
vendored
Normal file
16
.github/workflows/build.yml
vendored
Normal 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
|
11
.travis.yml
11
.travis.yml
@ -1,11 +0,0 @@
|
||||
language: java
|
||||
install: true
|
||||
|
||||
os: linux
|
||||
dist: trusty
|
||||
jdk: oraclejdk8
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: build
|
||||
script: ./gradlew build -s
|
@ -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
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
13
config.json
13
config.json
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -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
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user