forked from TongchengOpenSource/smart-doc-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
103 lines (92 loc) · 2.41 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
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
}
plugins {
id 'groovy'
id "java"
id "java-gradle-plugin"
id "maven-publish"
id "signing"
id "com.gradle.plugin-publish" version "0.12.0"
}
group 'com.github.shalousun'
version '2.6.6'
sourceCompatibility = 1.8
repositories {
maven {
allowInsecureProtocol = true
url 'http://localhost:8081/nexus/content/groups/public/'
}
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
dependencies {
implementation group: 'com.github.shalousun', name: 'smart-doc', version: '2.6.6'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
task javadocJar(type: Jar) {
archiveClassifier = "javadoc"
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
gradlePlugin {
plugins {
greetingsPlugin {
id = 'com.github.shalousun.smart-doc'
implementationClass = 'com.smartdoc.gradle.plugin.SmartDocPlugin'
}
}
}
// publish to https://plugins.gradle.org/
pluginBundle {
website = 'https://github.com/smart-doc-group/smart-doc-gradle-plugin'
vcsUrl = 'https://github.com/smart-doc-group/smart-doc-gradle-plugin'
description = 'smart-doc gradle plugin'
tags = ['smart-doc']
plugins {
greetingsPlugin {
// id is captured from java-gradle-plugin configuration
displayName = 'smart-doc gradle plugin'
}
}
}
// publish to local, see https://docs.gradle.org/current/userguide/publishing_maven.html
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version "${version}"
from components.java
// more goes in here
}
}
repositories {
maven {
allowInsecureProtocol(true)
url "http://localhost:8081/nexus/content/repositories/releases/"
credentials {
username 'admin'
password 'admin123'
}
}
}
}