Skip to content

Commit 91a2113

Browse files
committed
Merge branch 'release/add_maven_central_repo_for_this_project'
2 parents 8c806a7 + 20493c1 commit 91a2113

File tree

6 files changed

+141
-20
lines changed

6 files changed

+141
-20
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,31 @@ depends on <a href="https://github.com/ozodrukh">Ozodrukh's</a> animation util f
2020

2121
Using
2222
======
23-
First of all you have to upload animation submodule with `git submodule update --init` command
24-
You have to create special overlay layout to show in behind current `Circular Reveal` animated view.
23+
First of all you have to upload animation submodule with `git submodule update --init` command <br>
24+
<br>
25+
Or you can add gradle dependency with <br>
26+
```groovy
27+
dependencies {
28+
compile 'com.yalantis:sidemenu:1.0'`
29+
}
30+
```
31+
command.<br>
32+
and <br>
33+
```groovy
34+
repositories {
35+
maven {
36+
url "https://jitpack.io"
37+
}
38+
}
39+
dependencies {
40+
compile 'com.github.ozodrukh:CircularReveal:(latest-release)@aar'
41+
}
42+
43+
```
44+
<br> for CircularReveal module
45+
46+
47+
After you have to create special overlay layout to show in behind current `Circular Reveal` animated view.
2548
And to add all items to menu you have to add all of them into `LinearLayout`
2649

2750
```xml

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ buildscript {
1111
// in the individual module build.gradle files
1212
}
1313
}
14+
def isReleaseBuild() {
15+
return version.contains("SNAPSHOT") == false
16+
}
1417

1518
allprojects {
19+
version = VERSION_NAME
20+
group = GROUP
1621
repositories {
1722
jcenter()
1823
}
1924
}
25+
apply plugin: 'android-reporting'

gradle.properties

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# Project-wide Gradle settings.
2-
3-
# IDE (e.g. Android Studio) users:
4-
# Gradle settings configured through the IDE *will override*
5-
# any settings specified in this file.
6-
7-
# For more details on how to configure your build environment visit
8-
# http://www.gradle.org/docs/current/userguide/build_environment.html
9-
10-
# Specifies the JVM arguments used for the daemon process.
11-
# The setting is particularly useful for tweaking memory settings.
12-
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14-
15-
# When configured, Gradle will run in incubating parallel mode.
16-
# This option should only be used with decoupled projects. More details, visit
17-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18-
# org.gradle.parallel=true
1+
VERSION_NAME=1.0
2+
VERSION_CODE=1
3+
GROUP=com.yalantis
4+
5+
POM_DESCRIPTION=Side menu with some categories to choose. Made in Yalantis.
6+
POM_URL=https://github.com/Yalantis/Side-Menu.Android
7+
POM_SCM_URL=https://github.com/Yalantis/Side-Menu.Android
8+
POM_SCM_CONNECTION=scm:[email protected]:yalantis/Side-Menu.Android.git
9+
POM_SCM_DEV_CONNECTION=scm:[email protected]:yalantis/Side-Menu.Android.git
10+
POM_LICENCE_NAME=The Apache Software License, Version 2.0
11+
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
12+
POM_LICENCE_DIST=repo
13+
POM_DEVELOPER_ID=yalantis
14+
POM_DEVELOPER_NAME=Yalantis

library/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ android {
2020
dependencies {
2121
compile 'com.android.support:appcompat-v7:21.0.3'
2222
}
23+
apply from: '../mavenpush.gradle'

library/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=Side Menu
2+
POM_ARTIFACT_ID=sidemenu
3+
POM_PACKAGING=aar

mavenpush.gradle

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
apply plugin: 'maven'
2+
apply plugin: 'signing'
3+
4+
def sonatypeRepositoryUrl
5+
if (isReleaseBuild()) {
6+
println 'RELEASE BUILD'
7+
sonatypeRepositoryUrl = hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
8+
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
9+
} else {
10+
println 'DEBUG BUILD'
11+
sonatypeRepositoryUrl = hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
12+
: "https://oss.sonatype.org/content/repositories/snapshots/"
13+
}
14+
15+
def getRepositoryUsername() {
16+
return hasProperty('nexusUsername') ? nexusUsername : ""
17+
}
18+
19+
def getRepositoryPassword() {
20+
return hasProperty('nexusPassword') ? nexusPassword : ""
21+
}
22+
23+
afterEvaluate { project ->
24+
uploadArchives {
25+
repositories {
26+
mavenDeployer {
27+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
28+
29+
pom.artifactId = POM_ARTIFACT_ID
30+
31+
repository(url: sonatypeRepositoryUrl) {
32+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
33+
}
34+
35+
pom.project {
36+
name POM_NAME
37+
packaging POM_PACKAGING
38+
description POM_DESCRIPTION
39+
url POM_URL
40+
41+
scm {
42+
url POM_SCM_URL
43+
connection POM_SCM_CONNECTION
44+
developerConnection POM_SCM_DEV_CONNECTION
45+
}
46+
47+
licenses {
48+
license {
49+
name POM_LICENCE_NAME
50+
url POM_LICENCE_URL
51+
distribution POM_LICENCE_DIST
52+
}
53+
}
54+
55+
developers {
56+
developer {
57+
id POM_DEVELOPER_ID
58+
name POM_DEVELOPER_NAME
59+
}
60+
}
61+
}
62+
}
63+
}
64+
}
65+
66+
signing {
67+
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
68+
sign configurations.archives
69+
}
70+
71+
task androidJavadocs(type: Javadoc) {
72+
source = android.sourceSets.main.java.sourceFiles
73+
}
74+
75+
task androidJavadocsJar(type: Jar) {
76+
classifier = 'javadoc'
77+
//basename = artifact_id
78+
from androidJavadocs.destinationDir
79+
}
80+
81+
task androidSourcesJar(type: Jar) {
82+
classifier = 'sources'
83+
//basename = artifact_id
84+
from android.sourceSets.main.java.sourceFiles
85+
}
86+
87+
artifacts {
88+
//archives packageReleaseJar
89+
archives androidSourcesJar
90+
archives androidJavadocsJar
91+
}
92+
}

0 commit comments

Comments
 (0)