-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (88 loc) · 2.92 KB
/
build.gradle
File metadata and controls
95 lines (88 loc) · 2.92 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/7.2/userguide/building_java_projects.html
*/
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
}
apply plugin: 'maven-publish'
apply plugin: 'signing'
group 'com.doublechaintech'
version '1.0.4'
repositories {
// Use Maven Central for resolving dependencies.
mavenLocal()
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'
// This dependency is exported to consumers, that is to say found on their compile classpath.
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'cn.hutool:hutool-core:5.8.15'
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
options.addStringOption("charset", "UTF-8")
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'named-data-lib'
from components.java
pom {
name = 'named-data-lib'
description = 'named-data-lib'
url = 'https://github.com/doublechaintech/named-data-lib'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'pigdanx'
name = 'Danny Xie'
email = 'pigdanx@126.com'
}
}
scm {
connection = 'scm:git:https://github.com/doublechaintech/named-data-lib.git'
developerConnection = 'scm:git:ssh://git@github.com:doublechaintech/named-data-lib.git'
url = 'https://github.com/doublechaintech/named-data-lib'
}
}
}
}
repositories {
maven {
name = "OSSRH"
if (project.version.toString().endsWith("-SNAPSHOT")) {
url = "https://s01.oss.sonatype.org/content/repositories/snapshots"
} else {
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
sign(publishing.publications.mavenJava)
}