This repository has been archived by the owner on Jun 26, 2022. It is now read-only.
forked from nerro/table-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (69 loc) · 2.09 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
plugins {
id 'java-library'
id 'maven-publish'
id 'eclipse'
}
group 'de.geolykt.starloader'
archivesBaseName = 'tableLayout'
version '4.4.0'
// I know that this application was REALLY not meant for modern versions of java, but JPMS requires J9+, so we used J11.
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '11'
repositories {
// Only needed for tests
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/junit/junit
testImplementation 'junit:junit:4.13.2'
}
java {
modularity.inferModulePath.set(true)
}
jar {
manifest.attributes(
"Built-By": System.properties['user.name'],
"Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "Starloader-project"
)
}
javadoc {
options {
addBooleanOption('html5', true)
tags("apiNote:a:API Notice:", "implSpec:a:Implementation Specification:", "implNote:a:Implementation Notice:")
links "https://docs.oracle.com/en/java/javase/16/docs/api/"
}
// see https://stackoverflow.com/a/56641766
doLast {
// Append the fix to the file
def searchScript = new File(destinationDir, '/search.js')
searchScript.append '\n\n' +
'getURLPrefix = function(ui) {\n' +
' return \'\';\n' +
'};\n'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
plugin(MavenPublication) { publication ->
groupId project.group
artifactId project.archivesBaseName
version project.version
from components['java']
artifact sourcesJar
artifact javadocJar
}
}
repositories {
mavenLocal()
}
}