-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
164 lines (138 loc) · 3.87 KB
/
build.gradle
File metadata and controls
164 lines (138 loc) · 3.87 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
plugins {
id "com.vanniktech.maven.publish" version "0.34.0"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group 'org.freeplane.lightdev'
version = '0.19.12'
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/help/**'
}
resources {
srcDir 'src'
include 'com/lightdev/app/shtm/resources/**'
exclude 'com/lightdev/app/shtm/help/**'
}
}
help {
java {
srcDir 'src'
include 'com/lightdev/app/shtm/help/**'
}
resources {
srcDir 'src'
include 'com/lightdev/app/shtm/help/**'
exclude '**/*.java'
}
}
}
// Configure help source set to use main's dependencies
configurations {
helpImplementation.extendsFrom implementation
helpRuntimeOnly.extendsFrom runtimeOnly
}
// Configure Eclipse plugin to use only the IDE source set
eclipse {
classpath {
// Don't use any source sets, we'll define manually
sourceSets = []
file {
whenMerged { classpath ->
// Remove all existing source entries
classpath.entries.removeAll { it.kind == 'src' }
// Add a single, clean source entry that Eclipse will recognize
def sourceEntry = new org.gradle.plugins.ide.eclipse.model.SourceFolder('src', 'bin/main')
classpath.entries.add(0, sourceEntry)
}
}
}
}
// help.jar
task helpJar(type: Jar, dependsOn: helpClasses) {
archiveBaseName = 'SimplyHTMLHelp'
from sourceSets.help.output
}
// Configure the default jar task
jar {
archiveBaseName = 'SimplyHTML'
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Main-Class': 'com.lightdev.app.shtm.App',
)
}
}
build.dependsOn helpJar
// Configure the sourcesJar task to avoid duplicates
afterEvaluate {
tasks.named('sourcesJar') {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
mavenPublishing {
configure(new JavaLibrary(new JavadocJar.Javadoc(), true))
publishToMavenCentral(true)
signAllPublications()
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:git@github.com: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 = 'dpolivaev@gmx.de'
}
}
}
}
publishing {
repositories {
maven {
name = 'localartifacts'
url = "${project.gradle.gradleUserHomeDir}/local-artifacts"
}
}
}
signing {
sign publishing.publications.maven
}
javadoc {
enabled = true
options.encoding = "UTF-8"
failOnError = false
}