-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
93 additions
and
2 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
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,4 +1,31 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
|
||
ext { | ||
bintrayRepo = 'maven' | ||
bintrayName = 'OnboardingLayout' | ||
|
||
publishedGroupId = 'se.mattec' | ||
libraryName = 'OnboardingLayout' | ||
artifact = 'onboardinglayout' | ||
|
||
libraryDescription = 'An Android library for creating custom onboarding overlays.' | ||
|
||
siteUrl = 'https://github.com/mattec92/OnboardingLayout' | ||
gitUrl = 'https://github.com/mattec92/OnboardingLayout.git' | ||
|
||
libraryVersionCode = 1 | ||
libraryVersionName = '0.0.1' | ||
|
||
developerId = 'mattec92' | ||
developerName = 'Mattias Cederlund' | ||
developerEmail = '[email protected]' | ||
|
||
licenseName = 'The Apache Software License, Version 2.0' | ||
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
allLicenses = ["Apache-2.0"] | ||
} | ||
|
||
android { | ||
compileSdkVersion 24 | ||
|
@@ -7,8 +34,9 @@ android { | |
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 24 | ||
versionCode 1 | ||
versionName "1.0" | ||
versionCode libraryVersionCode | ||
versionName libraryVersionName | ||
project.archivesBaseName = artifact | ||
} | ||
buildTypes { | ||
release { | ||
|
@@ -23,3 +51,64 @@ dependencies { | |
testCompile 'junit:junit:4.12' | ||
compile 'com.android.support:appcompat-v7:24.1.0' | ||
} | ||
|
||
version = libraryVersionName | ||
group = publishedGroupId | ||
|
||
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 = bintrayName | ||
desc = libraryDescription | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
version { | ||
name = libraryVersionName | ||
released = new Date() | ||
vcsTag = libraryVersionName | ||
} | ||
} | ||
} | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom { | ||
project { | ||
packaging 'aar' | ||
groupId publishedGroupId | ||
artifactId artifact | ||
|
||
name libraryName | ||
description libraryDescription | ||
url siteUrl | ||
|
||
licenses { | ||
license { | ||
name licenseName | ||
url licenseUrl | ||
} | ||
} | ||
developers { | ||
developer { | ||
id developerId | ||
name developerName | ||
email developerEmail | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |