-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathbintray.gradle
More file actions
150 lines (126 loc) · 3.71 KB
/
bintray.gradle
File metadata and controls
150 lines (126 loc) · 3.71 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Compile groovy
apply plugin: 'groovy'
dependencies {
compile gradleApi()
compile localGroovy()
}
// Generate groovy doc
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.12'
}
apply from: 'provided.gradle'
apply from: 'version.gradle'
//import org.gradle.api.tasks.javadoc.GroovyDoc
//--------------------------------------------------------------------------------------------------
// Scripts to upload plugin to Bintray/JCenter [https://bintray.com/]
// > ./gradlew bintrayUpload
//--------------------------------------------------------------------------------------------------
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
apply plugin: 'com.github.dcendents.android-maven'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}
apply plugin: 'com.jfrog.bintray'
archivesBaseName = 'gradle-small'
def mavenDesc = 'Gradle plugin to build small android bundles.'
def baseUrl = 'https://github.com/wequick/Small'
def siteUrl = baseUrl//"${baseUrl}/tree/master/Android/gradle-small-plugin"
def gitUrl = "${baseUrl}.git"
def issueUrl = "${baseUrl}/issues"
def licenseIds = ['Apache-2.0']
def licenseNames = ['The Apache Software License, Version 2.0']
def licenseUrls = ['http://www.apache.org/licenses/LICENSE-2.0.txt']
def inception = '2015'
def username = 'Galen Lin'
install {
repositories {
mavenInstaller {
pom.project {
// Description
name archivesBaseName
description mavenDesc
url siteUrl
// Archive
groupId project.group
artifactId archivesBaseName
version project.version
// License
inceptionYear inception
licenses {
licenseNames.eachWithIndex { ln, li ->
license {
name ln
url licenseUrls[li]
}
}
}
developers {
developer {
name username
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allGroovy
classifier = 'sources'
}
//task genDoc(type: GroovyDoc) {
// source = sourceSets.main.groovy.srcDirs
//}
task javadocJar(type: Jar, dependsOn: groovydoc) {
classifier = 'javadoc'
from groovydoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
//task('bintrayUpload', overwrite: true) << {
// println sourceSets.main.allGroovy.properties
//}
//bintrayUpload.doFirst {
// println bintray.properties
// assert false
//}
// Bintray upload
bintray.user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') :
System.getenv('BINTRAY_USER')
bintray.key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') :
System.getenv('BINTRAY_API_KEY')
bintray.apiUrl = 'https://api.bintray.com'
bintray.configurations = ['archives']
bintray.pkg {
repo = "maven"
name = "net.wequick.tools.build:gradle-small"
desc = mavenDesc
websiteUrl = siteUrl
vcsUrl = gitUrl
issueTrackerUrl = issueUrl
licenses = licenseIds
labels = ['android', 'plugin', 'gradle', 'small']
publish = true
publicDownloadNumbers = true
}