Skip to content

Commit 6aa43d6

Browse files
committed
Bintray release scripts
1 parent 768d68a commit 6aa43d6

13 files changed

+249
-90
lines changed

gradle.properties

+11-13
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,18 @@ mockitoAndroidVersion=3.2.0
2727
dokkaVersion=0.10.0
2828

2929
# Publishing
30-
bintrayRepo=icon-dialog
31-
bintrayName=icon-dialog
30+
publishGroupId=com.maltaisn
31+
publishDeveloperId=maltaisn
3232

33-
publishedGroupId=com.maltaisn
34-
libraryName=icondialog
35-
artifact=icondialog
33+
publishDescription=Icon dialog for Android
3634

37-
libraryDescription=Icon dialog for Android
35+
publishGithubRepo=maltaisn/icondialoglib
36+
publishGithubReadme=README.md
3837

39-
siteUrl=https://github.com/maltaisn/icondialoglib
40-
gitUrl=https://github.com/maltaisn/icondialoglib.git
38+
publishRepoUrl=https://github.com/maltaisn/icondialoglib
39+
publishRepoConnection=scm:[email protected]:maltaisn/icondialoglib.git
40+
publishRepoIssues=https://github.com/maltaisn/icondialoglib/issues
4141

42-
developerId=maltaisn
43-
44-
license=Apache-2.0
45-
licenseName=The Apache Software License, Version 2.0
46-
licenseUrl=http://www.apache.org/licenses/LICENSE-2.0.txt
42+
publishLicense=Apache-2.0
43+
publishLicenseName=The Apache Software License, Version 2.0
44+
publishLicenseUrl=http://www.apache.org/licenses/LICENSE-2.0.txt

iconpacks/iconpack-default/LICENSE

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
Copyright (c) 2014, Austin Andrews (http://materialdesignicons.com/),
2+
with Reserved Font Name Material Design Icons.
3+
Copyright (c) 2014, Google (http://www.google.com/design/)
4+
uses the license at https://github.com/google/material-design-icons/blob/master/LICENSE
5+
6+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
7+
This license is copied below, and is also available with a FAQ at:
8+
http://scripts.sil.org/OFL
9+
10+
11+
-----------------------------------------------------------
12+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
13+
-----------------------------------------------------------
14+
15+
PREAMBLE
16+
The goals of the Open Font License (OFL) are to stimulate worldwide
17+
development of collaborative font projects, to support the font creation
18+
efforts of academic and linguistic communities, and to provide a free and
19+
open framework in which fonts may be shared and improved in partnership
20+
with others.
21+
22+
The OFL allows the licensed fonts to be used, studied, modified and
23+
redistributed freely as long as they are not sold by themselves. The
24+
fonts, including any derivative works, can be bundled, embedded,
25+
redistributed and/or sold with any software provided that any reserved
26+
names are not used by derivative works. The fonts and derivatives,
27+
however, cannot be released under any other type of license. The
28+
requirement for fonts to remain under this license does not apply
29+
to any document created using the fonts or their derivatives.
30+
31+
DEFINITIONS
32+
"Font Software" refers to the set of files released by the Copyright
33+
Holder(s) under this license and clearly marked as such. This may
34+
include source files, build scripts and documentation.
35+
36+
"Reserved Font Name" refers to any names specified as such after the
37+
copyright statement(s).
38+
39+
"Original Version" refers to the collection of Font Software components as
40+
distributed by the Copyright Holder(s).
41+
42+
"Modified Version" refers to any derivative made by adding to, deleting,
43+
or substituting -- in part or in whole -- any of the components of the
44+
Original Version, by changing formats or by porting the Font Software to a
45+
new environment.
46+
47+
"Author" refers to any designer, engineer, programmer, technical
48+
writer or other person who contributed to the Font Software.
49+
50+
PERMISSION & CONDITIONS
51+
Permission is hereby granted, free of charge, to any person obtaining
52+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
53+
redistribute, and sell modified and unmodified copies of the Font
54+
Software, subject to the following conditions:
55+
56+
1) Neither the Font Software nor any of its individual components,
57+
in Original or Modified Versions, may be sold by itself.
58+
59+
2) Original or Modified Versions of the Font Software may be bundled,
60+
redistributed and/or sold with any software, provided that each copy
61+
contains the above copyright notice and this license. These can be
62+
included either as stand-alone text files, human-readable headers or
63+
in the appropriate machine-readable metadata fields within text or
64+
binary files as long as those fields can be easily viewed by the user.
65+
66+
3) No Modified Version of the Font Software may use the Reserved Font
67+
Name(s) unless explicit written permission is granted by the corresponding
68+
Copyright Holder. This restriction only applies to the primary font name as
69+
presented to the users.
70+
71+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
72+
Software shall not be used to promote, endorse or advertise any
73+
Modified Version, except to acknowledge the contribution(s) of the
74+
Copyright Holder(s) and the Author(s) or with their explicit written
75+
permission.
76+
77+
5) The Font Software, modified or unmodified, in part or in whole,
78+
must be distributed entirely under this license, and must not be
79+
distributed under any other license. The requirement for fonts to
80+
remain under this license does not apply to any document created
81+
using the Font Software.
82+
83+
TERMINATION
84+
This license becomes null and void if any of the above conditions are
85+
not met.
86+
87+
DISCLAIMER
88+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
89+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
90+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
91+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
92+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
93+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
94+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
95+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
96+
OTHER DEALINGS IN THE FONT SOFTWARE.

iconpacks/iconpack-default/build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,11 @@ dependencies {
3535
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
3636
implementation "androidx.annotation:annotation:$annotationsVersion"
3737
}
38+
39+
tasks.withType(Javadoc).all {
40+
enabled = false
41+
}
42+
43+
if (project.hasProperty("publishAll") || project.hasProperty("publishDefaultPack")) {
44+
apply from: "../../release.gradle"
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
publishName=Default icon pack
2+
publishArtifactId=iconpack-default

iconpacks/iconpack-fa/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ dependencies {
3535
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
3636
implementation "androidx.annotation:annotation:$annotationsVersion"
3737
}
38+
39+
if (project.hasProperty("publishAll") || project.hasProperty("publishFaPack")) {
40+
apply from: "../../release.gradle"
41+
}
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
publishName=Font Awesome icon pack
2+
publishArtifactId=iconpack-font-awesome

iconpacks/iconpack-mdi/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ dependencies {
3535
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
3636
implementation "androidx.annotation:annotation:$annotationsVersion"
3737
}
38+
39+
if (project.hasProperty("publishAll") || project.hasProperty("publishMdiPack")) {
40+
apply from: "../../release.gradle"
41+
}
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
publishName=Community Material Design Icons pack
2+
publishArtifactId=iconpack-community-material

lib/bintray.gradle

-32
This file was deleted.

lib/build.gradle

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
plugins {
22
id "com.android.library"
33
id "kotlin-android"
4-
id "org.jetbrains.dokka"
54
}
65

76
ext {
87
// Auto generate version code based on version name
98
libVersionCode = versionToCode(libVersion)
10-
allLicenses = [license]
119
}
1210

1311
android {
@@ -55,11 +53,6 @@ dependencies {
5553
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$kotlinMockitoVersion"
5654
}
5755

58-
dokka {
59-
outputFormat = "html"
60-
outputDirectory = "${rootProject.projectDir}/docs/"
56+
if (project.hasProperty("publishAll") || project.hasProperty("publishLib")) {
57+
apply from: "../release.gradle"
6158
}
62-
tasks.withType(Javadoc).all { enabled = false }
63-
64-
apply from: "maven-install.gradle"
65-
apply from: "bintray.gradle"

lib/gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
publishName=Icon dialog library
2+
publishArtifactId=icon-dialog

lib/maven-install.gradle

-36
This file was deleted.

release.gradle

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
apply plugin: "com.jfrog.bintray"
2+
3+
afterEvaluate { project ->
4+
apply plugin: "maven-publish"
5+
apply plugin: "com.github.dcendents.android-maven"
6+
7+
def versionName = android.defaultConfig.versionName
8+
9+
task androidJavadocs(type: Javadoc) {
10+
failOnError = false
11+
source = android.sourceSets.main.java.source
12+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
13+
}
14+
15+
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
16+
classifier = "javadoc"
17+
from androidJavadocs.destinationDir
18+
}
19+
20+
task androidSourcesJar(type: Jar) {
21+
classifier = "sources"
22+
from android.sourceSets.main.java.source
23+
}
24+
25+
bintray {
26+
dryRun = false
27+
publish = true
28+
override = true
29+
user = project.property("bintray.user")
30+
key = project.property("bintray.apikey")
31+
32+
publications("release")
33+
34+
pkg {
35+
publish = true
36+
37+
repo = "icon-dialog"
38+
name = publishGroupId + ":" + publishArtifactId
39+
desc = publishDescription
40+
41+
websiteUrl = publishRepoUrl
42+
issueTrackerUrl = publishRepoIssues
43+
vcsUrl = publishRepoUrl
44+
45+
githubRepo = publishGithubRepo
46+
githubReleaseNotesFile = publishGithubReadme
47+
48+
publicDownloadNumbers = true
49+
licenses = [publishLicense]
50+
version {
51+
name = versionName
52+
vcsTag = versionName
53+
released = new Date()
54+
55+
mavenCentralSync {
56+
sync = true
57+
user = project.property("ossrhUsername")
58+
password = project.property("ossrhPassword")
59+
close = "1"
60+
}
61+
}
62+
}
63+
}
64+
65+
def pomConfig = {
66+
licenses {
67+
license {
68+
name publishLicenseName
69+
url publishLicenseUrl
70+
}
71+
}
72+
developers {
73+
developer {
74+
id publishDeveloperId
75+
}
76+
}
77+
scm {
78+
url publishRepoUrl
79+
connection publishRepoConnection
80+
developerConnection publishRepoConnection
81+
}
82+
}
83+
84+
publishing {
85+
publications {
86+
release(MavenPublication) {
87+
groupId publishGroupId
88+
artifactId publishArtifactId
89+
version versionName
90+
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
91+
artifact androidSourcesJar
92+
artifact androidJavadocsJar
93+
94+
pom.withXml {
95+
asNode().appendNode("name", publishName)
96+
asNode().appendNode("description", publishDescription)
97+
asNode().appendNode("url", publishRepoUrl)
98+
def dependenciesNode = asNode().appendNode("dependencies")
99+
configurations.implementation.allDependencies.each {
100+
// Ensure dependencies such as fileTree are not included.
101+
if (it.name != "unspecified") {
102+
def dependencyNode = dependenciesNode.appendNode("dependency")
103+
if (it.version != "unspecified") {
104+
dependencyNode.appendNode("groupId", it.group)
105+
dependencyNode.appendNode("artifactId", it.name)
106+
dependencyNode.appendNode("version", it.version)
107+
dependencyNode.appendNode("scope", "compile")
108+
}
109+
}
110+
}
111+
asNode().children().last() + pomConfig
112+
}
113+
}
114+
}
115+
}
116+
}

0 commit comments

Comments
 (0)