forked from google/schemaorg-java
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
123 lines (109 loc) · 4.23 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
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group 'com.squins.google.fork.schema-org-client'
project.version '1.0.1'
repositories {
mavenCentral()
}
dependencies {
api 'com.google.code.gson:gson:2.5'
api 'com.google.guava:guava:19.0'
implementation 'com.google.code.findbugs:jsr305:3.0.1'
testImplementation 'junit:junit:4.+'
testImplementation 'com.google.truth:truth:0.28'
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
withJavadocJar()
withSourcesJar()
}
}
javadoc {
failOnError = false
}
// Put your GPG and Sonatype credentials in "gradle.properties".
//
// Documentation for GPG:
// https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials
if (project.hasProperty('signing.keyId') && project.hasProperty('signing.password') && project.hasProperty('signing.secretKeyRingFile') && project.hasProperty('sonatype.username') && project.hasProperty('sonatype.password')) {
publishing {
publications {
Release(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
pom {
name = "Schema.org Client Library for Java"
description = "The Schema.org Client Library for Java is a library for creating schema.org entities." +
" The entities can be easily serialized and deserialized with JSON-LD format by using the " +
"JSON-LD serializer in the library."
url = "https://github.com/squins/schemaorg-java"
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
connection = 'scm:git:git@github.com:squins/schemaorg-java.git'
developerConnection = 'scm:git:scm:git:git@github.com:squins/schemaorg-java.git'
url = 'scm:git:git@github.com:squins/schemaorg-java.git'
}
developers {
developer {
id = "jstuyts"
name = "Johan Stuyts"
email = "johanstuyts@squins.com"
}
developer {
id = "keesvandieren"
name = "Kees van Dieren"
email = "keesvandieren@squins.com"
}
developer {
id = "yuanz1987"
url = "https://github.com/yuanz1987"
}
developer {
id = "danbri"
name = "Dan Brickley"
url = "https://github.com/danbri"
}
developer {
id = "lowasser"
name = "Louis Wasserman"
url = "https://github.com/lowasser"
}
}
}
}
}
repositories {
maven {
name = "ossSonatype"
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.property("sonatype.username")
password = project.property("sonatype.password")
}
}
}
}
signing {
sign publishing.publications.Release
}
}
test {
// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true
}