forked from luobolong/RW-HPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
48 lines (42 loc) · 1.29 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
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id("org.jetbrains.kotlin.jvm") version "1.7.20"
//id "org.tabooproject.shrinkingkt" version "1.0.2"
//id("me.him188.maven-central-publish") version "1.0.0-dev-3"
}
apply plugin: 'kotlin'
allprojects {
apply plugin: "java"
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: "maven-publish"
repositories{
maven{ url "https://maven.aliyun.com/nexus/content/groups/public/"}
maven{ url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2/" }
//maven { url "https://repo.spongepowered.org/repository/maven-public/" }
mavenCentral()
}
/* 使用Java8做标准语法并编译 */
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
//options.compilerArgs << "-Xlint:unchecked" << "-Werror"
//options.compilerArgs << "-Xdiags:verbose" << "-Werror"
//options.compilerArgs << "-Xlint:deprecation" << "-Werror"
}
}