-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (89 loc) · 2.88 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
plugins {
id "java-gradle-plugin"
id "com.gradle.plugin-publish" version "1.3.0"
id "signing"
}
base {
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
group = project.maven_group ?: rootProject.maven_group
archivesName = project.maven_name ?: rootProject.maven_name
version = project.maven_version ?: rootProject.maven_version
}
repositories {
mavenCentral()
}
dependencies {
compileOnly gradleApi()
api "org.ow2.asm:asm-commons:9.7.1"
}
gradlePlugin {
website = "https://github.com/RaphiMC/ClassTokenReplacer"
vcsUrl = "https://github.com/RaphiMC/ClassTokenReplacer"
plugins {
classtokenreplacer {
id = "net.raphimc.class-token-replacer"
implementationClass = "net.raphimc.classtokenreplacer.ClassTokenReplacerPlugin"
displayName = "ClassTokenReplacer"
description = "Gradle plugin to replace string tokens in class files during compile time"
tags.addAll("replacement", "token replacement")
}
}
}
java {
withSourcesJar()
withJavadocJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.name ?: rootProject.name}" }
}
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
repositories {
maven {
name = "reposilite"
url = "https://maven.lenni0451.net/" + (project.maven_version.endsWith("SNAPSHOT") ? "snapshots" : "releases")
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
pluginMaven(MavenPublication) {
pom {
name = "ClassTokenReplacer"
description = "Gradle plugin to replace string tokens in class files during compile time"
url = "https://github.com/RaphiMC/ClassTokenReplacer"
licenses {
license {
name = "LGPL-3.0 License"
url = "https://github.com/RaphiMC/ClassTokenReplacer/blob/main/LICENSE"
}
}
developers {
developer {
id = "RK_01"
}
}
scm {
connection = "scm:git:git://github.com/RaphiMC/ClassTokenReplacer.git"
developerConnection = "scm:git:ssh://github.com/RaphiMC/ClassTokenReplacer.git"
url = "https://github.com/RaphiMC/ClassTokenReplacer.git"
}
}
}
}
}
signing {
setRequired(false)
sign configurations.archives
sign publishing.publications.pluginMaven
}
project.tasks.withType(PublishToMavenRepository).forEach {
it.dependsOn(project.tasks.withType(Sign))
}