-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathpublish.gradle
More file actions
124 lines (107 loc) · 3.24 KB
/
publish.gradle
File metadata and controls
124 lines (107 loc) · 3.24 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
apply from: 'base.gradle'
apply from: 'version.gradle'
//--------------------------------------------------------------------------------------------------
// 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 {
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}
apply plugin: 'com.jfrog.bintray'
archivesBaseName = 'small'
def mavenDesc = 'A small framework to split android app into small parts.'
def siteUrl = 'https://github.com/wequick/Small'
def gitUrl = "${siteUrl}.git"
def issueUrl = "${siteUrl}/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.artifactId = archivesBaseName
pom.project {
packaging 'aar'
name mavenDesc
url siteUrl
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 android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
failOnError = false
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
options.locale = 'en_US'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
// 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.small:small"
desc = mavenDesc
websiteUrl = siteUrl
vcsUrl = gitUrl
issueTrackerUrl = issueUrl
licenses = licenseIds
labels = ['android', 'plugin', 'bundle', 'dynamic', 'small']
publish = true
publicDownloadNumbers = true
}