-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
68 lines (58 loc) · 1.74 KB
/
build.gradle.kts
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
plugins {
id("java")
//本地发布用的插件
id("maven-publish")
//远程仓库插件发布
id("com.gradle.plugin-publish") version "1.2.1"
//id ("org.jetbrains.kotlin.jvm")
//id ("java-gradle-plugin")
}
group = "cn.howxu.chocolate_gradle"
version = "1.4"
repositories {
//maven { url = uri("https://maven.aliyun.com/repositories/central") }
//mavenCentral()
//google()
mavenCentral()
//maven { url = uri("https://maven.google.com/") }
//插件发布仓库
//maven {url = uri("https://plugins.gradle.org/m2/")}
}
dependencies {
//Gradle的插件API
implementation(gradleApi())
//这两个依赖用来处理下载
implementation("commons-io:commons-io:2.16.1")
implementation("com.google.code.gson:gson:2.11.0")
implementation("org.apache.commons:commons-lang3:3.16.0")
//implementation("com.gradle.publish:plugin-publish-plugin:0.21.0")
}
//发布到gradle远程仓库中的配置 But it doesn't work
gradlePlugin {
//设定个人信息
website = "https://github.com/HowXu/chocolate_gradle"
vcsUrl = "https://github.com/HowXu/chocolate_gradle"
//插件描述
plugins {
create("Chocolate-gradle") {
id = "cn.howxu.chocolate_gradle"
displayName = "Chocolate gradle plugin"
description = "A Minecraft plugin for Chocolate Client development"
tags = listOf("minecraft","mcp")
implementationClass = "cn.howxu.chocolate_gradle.PluginMain"
}
}
}
//本地发布 for test
publishing {
repositories {
maven {
name = "Local"
url = uri("${projectDir}/repo")
}
}
}
//UTF8中文支持
tasks.withType<JavaCompile>{
options.encoding = "UTF-8"
}