-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
83 lines (71 loc) · 2.18 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'java-gradle-plugin'
}
group = 'org.stianloader'
archivesBaseName = 'interjava'
def baseVersion = '0.1.0'
targetCompatibility = compileJava.targetCompatibility = '1.8'
sourceCompatibility = compileJava.sourceCompatibility = '1.8'
repositories {
mavenCentral()
maven {
name = "wagyourtail"
url = "https://maven.wagyourtail.xyz/releases"
}
}
dependencies {
api "xyz.wagyourtail.jvmdowngrader:jvmdowngrader:0.1.3"
// Replacement classes for java APIs used by in the downgrading process jvmdowngrader
runtimeOnly "xyz.wagyourtail.jvmdowngrader:jvmdowngrader-java-api:0.1.3"
// https://mvnrepository.com/artifact/org.ow2.asm/asm
// (Transitive dependency of jvmdowngrader)
api "org.ow2.asm:asm:9.7"
api "org.ow2.asm:asm-tree:9.7"
api "org.ow2.asm:asm-util:9.7"
// https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine
// Updating hint: Caffeine 3.X.X requires J11+. Only upgrade if you know what you are doing
implementation 'com.github.ben-manes.caffeine:caffeine:2.9.3'
}
gradlePlugin {
// Define the plugin
plugins {
interjava {
id = project.group + '.' + project.archivesBaseName
version = baseVersion
implementationClass = 'org.stianloader.interjava.Interjava'
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
plugin(MavenPublication) { publication ->
groupId project.group
artifactId project.archivesBaseName
version baseVersion
from components['java']
//artifact sourcesJar
//artifact javadocJar
}
}
repositories {
if (System.getProperty('publishRepo') != null) {
maven {
url System.getProperty('publishRepo')
allowInsecureProtocol = true
}
} else {
mavenLocal()
}
}
}