forked from avast/android-styled-dialogs
-
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.
Building with gradle, gradle-like structure
- Loading branch information
David Vávra
committed
Jan 2, 2014
1 parent
d43c7f2
commit fe3e8ca
Showing
39 changed files
with
169 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.7.+' | ||
} | ||
} | ||
|
||
def isReleaseBuild() { | ||
return version.contains("SNAPSHOT") == false | ||
} | ||
|
||
allprojects { | ||
version = VERSION_NAME | ||
group = GROUP | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
apply plugin: 'android-reporting' |
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,14 @@ | ||
VERSION_NAME=1.1.2 | ||
VERSION_CODE=3 | ||
GROUP=eu.inmite.android.lib | ||
|
||
POM_DESCRIPTION=Android library for creating styleable dialogs easily | ||
POM_URL=https://github.com/inmite/android-styled-dialogs | ||
POM_SCM_URL=https://github.com/inmite/android-styled-dialogs | ||
POM_SCM_CONNECTION=scm:[email protected]:inmite/android-styled-dialogs.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:inmite/android-styled-dialogs.git | ||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
POM_DEVELOPER_ID[email protected] | ||
POM_DEVELOPER_NAME=David Vavra |
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,32 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.7.+' | ||
} | ||
} | ||
apply plugin: 'android-library' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion "19.0.0" | ||
|
||
defaultConfig { | ||
minSdkVersion 7 | ||
targetSdkVersion 19 | ||
versionName project.VERSION_NAME | ||
versionCode Integer.parseInt(project.VERSION_CODE) | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'com.android.support:support-v4:+' | ||
} | ||
|
||
// Used to push in maven | ||
apply from: '../maven_push.gradle' |
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,3 @@ | ||
POM_NAME=StyledDialogs for Android | ||
POM_ARTIFACT_ID=android-styled-dialogs | ||
POM_PACKAGING=aar |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,82 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
def sonatypeRepositoryUrl | ||
if (isReleaseBuild()) { | ||
println 'RELEASE BUILD' | ||
sonatypeRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} else { | ||
println 'DEBUG BUILD' | ||
sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
afterEvaluate { project -> | ||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
pom.artifactId = POM_ARTIFACT_ID | ||
|
||
repository(url: sonatypeRepositoryUrl) { | ||
authentication(userName: nexusUsername, password: nexusPassword) | ||
} | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main.allJava | ||
} | ||
|
||
task androidJavadocsJar(type: Jar) { | ||
classifier = 'javadoc' | ||
//basename = artifact_id | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
//basename = artifact_id | ||
from android.sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
//archives packageReleaseJar | ||
archives androidSourcesJar | ||
archives androidJavadocsJar | ||
} | ||
} |
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 @@ | ||
include 'library' |