-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (90 loc) · 3.17 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
103
104
105
106
107
import org.overrun.*
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath 'io.github.over-run:window_gradle_plugin:1.0.0.0'
}
}
plugins {
id 'java-platform'
id 'maven-publish'
id ''
}
Win32 name = (Win32) project.getExtensions().getByName("win32")
subprojects {
if (project.name != "window_gradle_plugin") {
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'signing'
group = maven_group
version = project_version
repositories {
mavenCentral()
maven { url 'https://maven.aliyun.com/repository/central' }
// temporary maven repositories
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
compileOnly 'org.jetbrains:annotations:24.0.1'
}
def targetJavaVersion = 21
tasks.withType(JavaCompile).configureEach {
options.encoding encode
options.compilerArgs += '--enable-preview'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
withJavadocJar()
withSourcesJar()
}
tasks.withType(Javadoc).configureEach {
if (options instanceof CoreJavadocOptions) {
options.addBooleanOption('-enable-preview', true)
options.addStringOption('source', sourceCompatibility.toString())
}
failOnError = false
options.encoding 'UTF-8'
options.charSet 'UTF-8'
options.author true
options.locale 'en_US'
options.links "https://docs.oracle.com/en/java/javase/${sourceCompatibility}/docs/api/"
options.windowTitle "OverrunGL $project_version Javadoc"
}
jar {
manifestContentCharset 'utf-8'
metadataCharset 'utf-8'
from 'LICENSE'
manifest.attributes(
'Specification-Title': archives_base_name,
'Specification-Vendor': 'Overrun Organization',
'Specification-Version': '0',
'Implementation-Title': archives_base_name,
'Implementation-Vendor': 'Overrun Organization',
'Implementation-Version': archiveVersion
)
}
sourcesJar {
dependsOn classes
archiveClassifier.set 'sources'
from sourceSets.main.allSource, 'LICENSE'
}
javadocJar {
dependsOn javadoc
archiveClassifier.set 'javadoc'
from javadoc, 'LICENSE'
}
artifacts {
archives javadocJar, sourcesJar
}
idea.module.inheritOutputDirs = true
}
}