-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add necessary bintray publication date
- Loading branch information
Alexander Surinov
committed
Jun 25, 2018
1 parent
1d3c85e
commit c9d9fcd
Showing
4 changed files
with
155 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
version = libraryVersion | ||
|
||
/* | ||
* Comment the following part if you only want to distribute .aar files. | ||
* (For example, your source code is obfuscated by Proguard and is not shown to outsite developers) | ||
* Without source code .jar files, you only can publish on bintray respository but not jcenter. | ||
*/ | ||
|
||
/*--------------------------------*/ | ||
if (project.hasProperty("android")) { | ||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
} else { // Java libraries | ||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
/*--------------------------------*/ | ||
|
||
// Bintray | ||
Properties properties = new Properties() | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
|
||
bintray { | ||
user = properties.getProperty("bintray.user") | ||
key = properties.getProperty("bintray.apikey") | ||
|
||
configurations = ['archives'] | ||
pkg { | ||
repo = bintrayRepo | ||
name = bintrayPackageName | ||
desc = libraryDescription | ||
userOrg = organization // If the repository is hosted by an organization instead of personal account. | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
publish = true | ||
publicDownloadNumbers = true | ||
version { | ||
desc = libraryDescription | ||
gpg { | ||
sign = true | ||
passphrase = properties.getProperty("bintray.gpg.password") | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
|
||
group = groupId // Maven Group ID for the artifact | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
// This generates POM.xml with proper parameters | ||
pom.project { | ||
packaging 'aar' | ||
groupId groupId | ||
artifactId artifactId | ||
|
||
// Add your description here | ||
name libraryName | ||
description libraryDescription | ||
url siteUrl | ||
|
||
// Set your license | ||
licenses { | ||
license { | ||
name licenseName | ||
url licenseUrl | ||
} | ||
} | ||
developers { | ||
developer { | ||
id developerId | ||
name developerName | ||
email developerEmail | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
|
||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
|
||
// Bintray publication data | ||
ext { | ||
bintrayRepo = 'maven' | ||
bintrayPackageName = 'cpcalendar' | ||
|
||
// Library package info | ||
groupId = 'ru.cleverpumpkin' | ||
artifactId = 'cpcalendar' | ||
libraryVersion = app.version_name | ||
|
||
// Library name and description | ||
libraryName = 'CPCalendar' | ||
libraryDescription = 'Light, powerful and easy to use Calendar Widget with a number of features out of the box' | ||
|
||
// Git info | ||
siteUrl = 'https://github.com/CleverPumpkin/cpcalendar-android' | ||
gitUrl = 'https://github.com/CleverPumpkin/cpcalendar-android.git' | ||
|
||
// Developer info | ||
developerId = 'alexsurinov' | ||
developerName = 'Alexander Surinov' | ||
developerEmail = '[email protected]' | ||
organization = 'cleverpumpkin' | ||
|
||
// License info | ||
licenseName = 'MIT' | ||
licenseUrl = 'https://opensource.org/licenses/MIT' | ||
allLicenses = ["MIT"] | ||
} | ||
|
||
android { | ||
compileSdkVersion app.compile_sdk_version | ||
|
||
|
@@ -23,11 +53,18 @@ dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
// Kotlin language standard lib | ||
api "org.jetbrains.kotlin:kotlin-stdlib:$libs.kotlin_version" | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$libs.kotlin_version" | ||
|
||
// Support libraries | ||
api "com.android.support:appcompat-v7:$libs.support_lib_version" | ||
api "com.android.support:recyclerview-v7:$libs.support_lib_version" | ||
implementation "com.android.support:appcompat-v7:$libs.support_lib_version" | ||
implementation "com.android.support:recyclerview-v7:$libs.support_lib_version" | ||
|
||
testImplementation 'junit:junit:4.12' | ||
} | ||
} | ||
|
||
tasks.withType(Javadoc).all { | ||
enabled = false | ||
} | ||
|
||
apply from: '../bintray/install.gradle' | ||
apply from: '../bintray/bintray.gradle' |