Skip to content

Commit 8639869

Browse files
committed
init.
1 parent aae4cc9 commit 8639869

File tree

8 files changed

+347
-0
lines changed

8 files changed

+347
-0
lines changed

build.gradle.kts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
plugins {
2+
kotlin("jvm") version "1.4.30"
3+
id("com.github.johnrengelman.shadow") version "6.1.0"
4+
}
5+
6+
group = "me.scoretwo"
7+
version = "1.0-SNAPSHOT"
8+
9+
repositories {
10+
mavenCentral()
11+
mavenLocal()
12+
maven("http://repo.iroselle.com/snapshots/")
13+
}
14+
15+
dependencies {
16+
implementation(kotlin("stdlib"))
17+
implementation("org.codehaus.groovy:groovy-jsr223:3.0.7")
18+
compileOnly("me.scoretwo:FastScript-common:1.0.1-SNAPSHOT")
19+
}
20+
21+
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
22+
dependencies {
23+
exclude(dependency("org.jetbrains.kotlin:kotlin-stdlib"))
24+
exclude(dependency("org.jetbrains.kotlin:kotlin-stdlib-common"))
25+
26+
include(dependency("org.codehaus.groovy:groovy-jsr223:3.0.7"))
27+
include(dependency("org.codehaus.groovy:groovy:3.0.7"))
28+
}
29+
relocate("kotlin", "me.scoretwo.utils.shaded.kotlin")
30+
classifier = null
31+
}
32+
tasks.processResources {
33+
from("src/main/resources") {
34+
include("expansion.yml")
35+
expand(mapOf(
36+
"name" to rootProject.name,
37+
"version" to rootProject.version,
38+
"description" to rootProject.description
39+
))
40+
}
41+
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.code.style=official
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rootProject.name = "Expansion-Groovy"
2+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package me.scoretwo.fastscript.expansion.groovy
2+
3+
import groovy.lang.GroovyShell
4+
import me.scoretwo.fastscript.expansion.typeengine.TypeEngineExpansion
5+
import javax.script.ScriptEngine
6+
7+
/**
8+
* @author Score2
9+
* @date 2021/2/22 9:28
10+
*
11+
* @project Expansion-Groovy
12+
*/
13+
class GroovyExpansion: TypeEngineExpansion() {
14+
override val name: String = "Groovy"
15+
override val sign: String = "groovy"
16+
override val fileSuffix: String = "groovy"
17+
override val engine: ScriptEngine = scriptEngineManager.getEngineByName("groovy")
18+
}

src/main/resources/expansion.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: ${name}
2+
version: ${version}
3+
main: me.scoretwo.fastscript.expansion.groovy.GroovyExpansion
4+
description: '${description}'
5+
authors:
6+
- 'Score2'

0 commit comments

Comments
 (0)