-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
117 lines (101 loc) · 3.1 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.5"
}
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'groovy'
apply plugin: 'maven'
repositories {
mavenCentral ()
flatDir {
name "fileRepo"
dirs "repo"
}
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.apache.maven:maven-jxr:2.5'
testCompile 'junit:junit:4.12'
}
task packageSources (type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives (packageSources)
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 60, 'seconds'
}
// Set the minimum required properties
// configured to publish your plugin to the plugin portal
pluginBundle {
website = 'http://github.com/davidecavestro/gradle-jxr-plugin'
vcsUrl = 'https://github.com/davidecavestro/gradle-jxr-plugin.git'
description = 'A Gradle plugin that uses Maven JXR to produce cross-reference for project\'s sources.'
tags = ['jxr', 'xref', 'cross-reference']
plugins {
jxrPlugin {
id = 'net.davidecavestro.gradle.jxr'
displayName = 'Gradle JXR plugin'
}
}
}
if(project.hasProperty("userRemoteRepo")) {
def installer = install.repositories.mavenInstaller
def deployer = null
uploadArchives {
repositories {
deployer = mavenDeployer {
name = 'bintrayDeployer'
repository(url: bintrayReleaseUrl) {
try {
authentication(userName: bintrayUsername, password: bintrayPassword)
} catch (MissingPropertyException pne) {
// ignore, don't authenticate
}
}
}
}
}
[installer, deployer].each { repo ->
configure(repo) {
pom.project {
name('gradle-jxr-plugin')
description("A Gradle plugin that uses Maven JXR to produce cross-reference for project's sources.")
url('http://github.com/davidecavestro/gradle-jxr-plugin')
inceptionYear '2013'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm { url "https://github.com/davidecavestro/gradle-jxr-plugin.git" }
developers {
[
davidecavestro: 'Davide Cavestro', baron1405: 'Baron Roberts'
].each { devId, devName ->
developer {
id devId
name devName
roles { role 'Developer' }
}
}
}
}
}
}
} else {
uploadArchives {
repositories { add project.repositories.fileRepo }
}
}