forked from unnamed/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
93 lines (83 loc) · 2.39 KB
/
Copy pathbuild.gradle
File metadata and controls
93 lines (83 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
plugins {
id "org.jetbrains.kotlin.jvm" version "2.4.10"
id "java-library"
id "maven-publish"
id("net.neoforged.licenser") version "0.7.5"
id("me.champeau.jmh") version "0.7.3"
}
repositories {
mavenCentral()
maven {
url = uri("https://repo.redlance.org/public") // mirroring https://maven.pkg.github.com/bedrockk/MoLang
}
maven { url = "https://maven.blamejared.com/"} // moonflower's molang-compiler
}
dependencies {
implementation api("io.netty:netty-buffer:4.2.17.Final")
compileOnlyApi("org.jetbrains:annotations:26.1.0")
// tests
testImplementation("org.junit.jupiter:junit-jupiter-api:6.1.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:6.1.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.1.3")
testImplementation("org.jetbrains.kotlin:kotlin-stdlib:2.4.10")
// performance comparison with other libraries
jmhImplementation("com.bedrockk:molang:1.0-SNAPSHOT")
jmhImplementation("gg.moonflower:molang-compiler:3.1.1.19")
}
tasks.register('generateExpectations', Exec) {
def nvmDir = file("${System.getenv('HOME')}/.nvm/versions/node")
executable nvmDir.isDirectory() ? "${nvmDir.listFiles().sort().last()}/bin/node" : 'node'
args 'scripts/generate_expectations.js'
}
tasks {
test {
useJUnitPlatform()
dependsOn tasks.generateExpectations
}
compileJmhJava {
sourceCompatibility = "24"
targetCompatibility = "24"
}
compileJava {
sourceCompatibility = "24"
targetCompatibility = "24"
}
javadoc {
failOnError = false
}
compileKotlin {
enabled = false
}
}
license {
header.set(rootProject.resources.text.fromFile("header.txt"))
include("**/*.java")
newLine = false
}
java {
withJavadocJar()
withSourcesJar()
}
jar {
manifest.attributes("FMLModType": "GAMELIBRARY")
}
publishing {
repositories {
maven {
name = "RedlanceMinecraft"
url = "https://repo.redlance.org/public"
credentials {
username = "dima_dencep"
password = System.getenv("MAVEN_PASSWORD")
}
}
}
publications {
maven(MavenPublication) {
groupId = "com.zigythebird"
artifactId = "mochafloats"
version = project.version
from components.java
}
}
}