-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
143 lines (128 loc) · 3.57 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group 'org.freeplane.lightdev'
version = '0.19.9'
targetCompatibility='1.8'
sourceCompatibility='1.8'
repositories {
mavenCentral()
maven { url "${project.gradle.gradleUserHomeDir}/local-artifacts" }
}
dependencies {
implementation 'javax.help:javahelp:2.0.05'
implementation 'org.freeplane.dpolivaev.mnemonicsetter:mnemonicsetter:0.6'
implementation 'commons-lang:commons-lang:2.6'
}
sourceSets {
main {
java {
srcDir 'src'
exclude 'com/lightdev/app/shtm/resources/**'
exclude 'com/lightdev/app/shtm/help/**'
}
}
main {
resources {
srcDir 'src'
include 'com/lightdev/app/shtm/resources/**'
include 'com/lightdev/app/shtm/help/**'
}
}
}
// help.jar
task helpJar(type: Jar) {
archiveBaseName = 'SimplyHTMLHelp'
from(sourceSets.main.output) {
include "com/lightdev/app/shtm/help/**"
}
}
// lib.jar
task mainJar(type: Jar, dependsOn: classes) {
archiveBaseName = 'SimplyHTML'
from(sourceSets.main.output) {
exclude "com/lightdev/app/shtm/help/**"
}
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Main-Class': 'com.lightdev.app.shtm.App',
)
}
}
task sourceJar(type: Jar) {
archiveBaseName = 'SimplyHTML'
archiveClassifier = 'sources'
from (sourceSets.main.allSource){
exclude "com/lightdev/app/shtm/help/**"
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
build.dependsOn mainJar
build.dependsOn javadoc
publishing {
publications {
maven(MavenPublication) {
artifactId 'simplyhtml'
groupId = project.group
version = project.version
artifact mainJar
artifact sourceJar
artifact javadocJar
pom {
name = project.name
description = 'Application and java components for html'
url = 'https://sourceforge.net/projects/simplyhtml/'
scm {
url = 'https://github.com/freeplane/shtml'
connection = 'scm:git:https://github.com/freeplane/shtml.git'
developerConnection = 'scm:git:[email protected]:freeplane/shtml.git'
}
licenses {
license {
name = 'GPL, Version 2 or later'
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id = 'lightdev'
name = 'Ulrich Hilger'
}
developer {
id = 'dpolivaev'
name = 'Dimitry Polivaev'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
name = 'central'
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username project.findProperty('ossrhUsername') ?: '-'
password project.findProperty('ossrhPassword') ?: '-'
}
}
maven {
name = 'localartifacts'
url = "${project.gradle.gradleUserHomeDir}/local-artifacts"
}
}
}
signing {
sign publishing.publications.maven
}
javadoc {
enabled = true
options.encoding = "UTF-8"
failOnError = false
}