-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (80 loc) · 2.21 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'signing'
}
apply from: 'lib.gradle'
group = 'cn.vika'
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'vika-social'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Vika Social Sdk'
description = 'This is a project for vika SaaS'
url = 'https://github.com/vikadata/vika-social'
licenses {
license {
name = 'MIT License'
url = 'https://vikadata.mit-license.org'
}
}
developers {
developer {
name = 'Bron'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]:vikadata/vika-social.git'
developerConnection = 'scm:git:[email protected]:vikadata/vika-social.git'
url = 'https://github.com/vikadata/vika-social'
}
}
}
}
repositories {
maven {
name = "OSSRH"
if (project.version.toString().endsWith("-SNAPSHOT")) {
url = "https://oss.sonatype.org/content/repositories/snapshots"
} else {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
allprojects {
repositories {
mavenCentral()
}
}
jar {
enabled = true
}