-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (87 loc) · 2.89 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'at.jddev0.lang'
version = '1.0.0-beta-10-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.2')
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
}
test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'lang-interpreter'
groupId = 'at.jddev0.lang'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
packaging = 'jar'
name = 'Lang Interpreter'
description = 'The Standard Lang reference implementation of the Lang Programming language'
url = 'https://github.com/lang-programming/lang-interpreter'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'jddev0'
name = 'JDDev0'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/lang-programming/lang-interpreter.git'
developerConnection = 'scm:git:ssh://github.com:lang-programming/lang-interpreter.git'
url = 'https://github.com/lang-programming/lang-interpreter'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/releases'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.hasProperty('publishMavenUsername')?getProperty('publishMavenUsername'):''
password = project.hasProperty('publishMavenPassword')?getProperty('publishMavenPassword'):''
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
tasks.withType(Sign)*.enabled = project.hasProperty('publishMavenUsername')
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}