Skip to content

Commit 38172f7

Browse files
committed
Format build file; add vscode editor settings
1 parent 8bb3a01 commit 38172f7

File tree

2 files changed

+73
-61
lines changed

2 files changed

+73
-61
lines changed

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"[groovy]": {
3+
"editor.tabSize": 2
4+
},
5+
"editor.detectIndentation": true,
6+
"editor.insertSpaces": true
7+
}

build.gradle

Lines changed: 66 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'me.champeau.jmh' version '0.7.1'
55
id 'net.researchgate.release' version '3.0.2'
66
id 'com.github.node-gradle.node' version '7.0.0'
7-
id 'jacoco'
7+
id 'jacoco'
88
id 'java-library'
99
id 'maven-publish'
1010
id 'signing'
@@ -91,11 +91,16 @@ test {
9191
}
9292

9393
jacocoTestReport {
94-
reports {
95-
xml.required = true
96-
csv.required = true
97-
html.destination file("${buildDir}/jacoco-report")
98-
}
94+
reports {
95+
xml.required = true
96+
csv.required = true
97+
html.destination file("${buildDir}/jacoco-report")
98+
}
99+
}
100+
101+
javadoc {
102+
destinationDir = file("${buildDir}/docs/javadoc")
103+
options.showFromPublic()
99104
}
100105

101106
// Disable Javadoc linting under Java 8+
@@ -147,72 +152,72 @@ java {
147152
}
148153

149154
publishing {
150-
publications {
151-
mavenJava(MavenPublication) {
152-
artifactId = 'cldr-engine'
153-
from components.java
154-
versionMapping {
155-
usage('java-api') {
156-
fromResolutionOf('runtimeClasspath')
157-
}
158-
usage('java-runtime') {
159-
fromResolutionResult()
160-
}
161-
}
162-
pom {
163-
name = 'cldr-engine'
164-
description = 'Squarespace cldr-engine'
165-
url = 'https://github.com/squarespace/cldr-engine-java'
166-
licenses {
167-
license {
168-
name = 'The Apache License, Version 2.0'
169-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
170-
}
171-
}
172-
developers {
173-
developer {
174-
id = 'pathensley'
175-
name = 'Patrick Hensley'
176-
email = 'pathensley@gmail.com'
177-
}
178-
}
179-
scm {
180-
connection = 'scm:git:git@github.com:Squarespace/cldr-engine-java.git'
181-
developerConnection = 'scm:git:git@github.com:Squarespace/cldr-engine-java.git'
182-
url = 'https://github.com/squarespace/cldr-engine-java'
183-
}
184-
}
155+
publications {
156+
mavenJava(MavenPublication) {
157+
artifactId = 'cldr-engine'
158+
from components.java
159+
versionMapping {
160+
usage('java-api') {
161+
fromResolutionOf('runtimeClasspath')
185162
}
186-
}
187-
repositories {
188-
maven {
189-
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
190-
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
191-
def _username = project.ext.properties.OSS_USERNAME
192-
def _password = project.ext.properties.OSS_PASSWORD
193-
194-
if (project.hasProperty('publish-internal')) {
195-
releasesRepoUrl = NEXUS_INTERNAL_RELEASE_URL
196-
snapshotsRepoUrl = NEXUS_INTERNAL_SNAPSHOT_URL
197-
_username = NEXUS_USERNAME
198-
_password = System.getenv('NEXUS_PASSWORD')
163+
usage('java-runtime') {
164+
fromResolutionResult()
165+
}
166+
}
167+
pom {
168+
name = 'cldr-engine'
169+
description = 'Squarespace cldr-engine'
170+
url = 'https://github.com/squarespace/cldr-engine-java'
171+
licenses {
172+
license {
173+
name = 'The Apache License, Version 2.0'
174+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
199175
}
200-
201-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
202-
credentials {
203-
username = _username
204-
password = _password
176+
}
177+
developers {
178+
developer {
179+
id = 'pathensley'
180+
name = 'Patrick Hensley'
181+
email = 'pathensley@gmail.com'
205182
}
206183
}
184+
scm {
185+
connection = 'scm:git:git@github.com:Squarespace/cldr-engine-java.git'
186+
developerConnection = 'scm:git:git@github.com:Squarespace/cldr-engine-java.git'
187+
url = 'https://github.com/squarespace/cldr-engine-java'
188+
}
189+
}
207190
}
191+
}
192+
repositories {
193+
maven {
194+
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
195+
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
196+
def _username = project.ext.properties.OSS_USERNAME
197+
def _password = project.ext.properties.OSS_PASSWORD
198+
199+
if (project.hasProperty('publish-internal')) {
200+
releasesRepoUrl = NEXUS_INTERNAL_RELEASE_URL
201+
snapshotsRepoUrl = NEXUS_INTERNAL_SNAPSHOT_URL
202+
_username = NEXUS_USERNAME
203+
_password = System.getenv('NEXUS_PASSWORD')
204+
}
205+
206+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
207+
credentials {
208+
username = _username
209+
password = _password
210+
}
211+
}
212+
}
208213
}
209214

210215
tasks.withType(Sign) {
211216
onlyIf { isRelease }
212217
}
213218

214219
signing {
215-
sign publishing.publications.mavenJava
216-
useGpgCmd()
220+
sign publishing.publications.mavenJava
221+
useGpgCmd()
217222
}
218223

0 commit comments

Comments
 (0)