-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
65 lines (58 loc) · 1.65 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
buildscript {
ext.kotlin_version = '1.7.20-Beta'
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2' }
}
dependencies {
classpath group: 'com.github.jengelman.gradle.plugins', name: 'shadow', version: '4.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" //打包
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'
group 'net.minecraft'
version '1.0-SNAPSHOT'
allprojects {
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven { url 'https://libraries.minecraft.net' }
maven { url 'https://enaium.gitee.io/maven' }
maven { url 'https://repo1.maven.org/maven2/' }
}
}
dependencies {
compile group: 'net.minecraft', name: 'minecraft', version: '1.8.9'//游戏本体
compile 'com.google.zxing:core:3.5.0'
compile fileTree(include: ["*.jar"], dir: "lib")
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
shadowJar {
dependencies {
include(dependency('net.minecraft:minecraft'))
include(dependency('org.jetbrains.kotlin:kotlin-stdlib'))
include(dependency('com.google.zxing:core'))
}
}
build.dependsOn shadowJar
repositories {
mavenCentral()
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}