-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
114 lines (95 loc) · 2.97 KB
/
build.gradle
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
buildscript {
repositories {
maven { url = "https://maven.aliyun.com/repository/public" }
mavenCentral()
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.10'
id 'org.jetbrains.dokka' version '1.8.10'
id 'maven-publish'
id 'signing'
}
group = 'top.kmar.game'
archivesBaseName = 'cg-engine'
version = '1.2.1'
repositories {
maven { url = "https://maven.aliyun.com/repository/public" }
mavenCentral()
}
dependencies {
implementation group: 'it.unimi.dsi', name: 'fastutil-core', version: '8.5.12'
}
kotlin {
jvmToolchain(8)
}
compileKotlin {
compilerOptions {
freeCompilerArgs.addAll(
// "-Xuse-k2", // k2
"-Xjvm-default=all", // 接口 default 方法
"-Xlambdas=indy", // indy
"-Xassertions=always-disable", // 禁用断言
"-Xsam-conversions=indy",
"-Xvalidate-bytecode" // 优化
)
}
}
java {
withSourcesJar()
}
dokkaHtml {
outputDirectory.set(file("build/documentation/html"))
}
tasks.register('dokkaJavadocJar', Jar.class) {
dependsOn(dokkaHtml)
from(dokkaHtml)
archiveClassifier.set("javadoc")
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact(tasks["dokkaJavadocJar"])
artifactId archivesBaseName
pom {
name = 'Console Game Engine'
description = 'A console game engine for the JVM.'
url = 'https://github.com/EmptyDreams/ConsoleGameEngine'
scm {
url = 'https://github.com/EmptyDreams/ConsoleGameEngine'
connection = 'scm:git:git:github.com/EmptyDreams/ConsoleGameEngine.git'
developerConnection = 'scm:git:ssh://[email protected]:EmptyDreams/ConsoleGameEngine.git'
}
licenses {
license {
name = 'The Affero General Public License, Version 3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
}
}
developers {
developer {
id = 'Kmar'
name = '空梦'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
name = archivesBaseName
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}