Skip to content

Commit 52594b7

Browse files
committed
changes
1 parent 2d9246d commit 52594b7

File tree

6 files changed

+215
-7
lines changed

6 files changed

+215
-7
lines changed

.gitignore

Lines changed: 83 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,86 @@
1-
*.iml
2-
.gradle
3-
/local.properties
1+
# [Android] ========================
2+
# Built application files
3+
*.apk
4+
*.ap_
5+
6+
# Files for the Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
30+
## Directory-based project format:
31+
.idea/
32+
33+
## File-based project format:
34+
*.ipr
35+
*.iws
36+
37+
## Plugin-specific files:
38+
39+
# IntelliJ
40+
out/
41+
42+
# mpeltonen/sbt-idea plugin
43+
.idea_modules/
44+
45+
# JIRA plugin
46+
atlassian-ide-plugin.xml
47+
48+
# Crashlytics plugin (for Android Studio and IntelliJ)
49+
com_crashlytics_export_strings.xml
50+
51+
52+
# [Maven] ========================
53+
target/
54+
pom.xml.tag
55+
pom.xml.releaseBackup
56+
pom.xml.versionsBackup
57+
pom.xml.next
58+
release.properties
59+
60+
61+
# [Gradle-Android] ========================
62+
63+
# Ignore Gradle GUI config
64+
gradle-app.setting
65+
66+
# Gradle Signing
67+
signing.properties
68+
trestle.keystore
69+
70+
# Mobile Tools for Java (J2ME)
71+
.mtj.tmp/
72+
73+
# Package Files #
74+
*.jar
75+
*.war
76+
*.ear
77+
78+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
79+
hs_err_pid*
80+
81+
# Misc
482
/.idea/workspace.xml
5-
/.idea/libraries
683
.DS_Store
7-
/build
884
/captures
9-
.externalNativeBuild
85+
**/*.iml
86+
*.class

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

boxloader2/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply from: 'maven-push.gradle'
23

34
android {
45
compileSdkVersion 25

boxloader2/gradle.properties

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

boxloader2/maven-push.gradle

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
* Copyright 2013 Chris Banes
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'maven'
18+
apply plugin: 'signing'
19+
20+
def isReleaseBuild() {
21+
return VERSION_NAME.contains("SNAPSHOT") == false
22+
}
23+
24+
def getReleaseRepositoryUrl() {
25+
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
26+
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
27+
}
28+
29+
def getSnapshotRepositoryUrl() {
30+
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
31+
: "https://oss.sonatype.org/content/repositories/snapshots/"
32+
}
33+
34+
def getRepositoryUsername() {
35+
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
36+
}
37+
38+
def getRepositoryPassword() {
39+
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
40+
}
41+
42+
afterEvaluate { project ->
43+
uploadArchives {
44+
repositories {
45+
mavenDeployer {
46+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47+
48+
pom.groupId = GROUP
49+
pom.artifactId = POM_ARTIFACT_ID
50+
pom.version = VERSION_NAME
51+
52+
repository(url: getReleaseRepositoryUrl()) {
53+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54+
}
55+
snapshotRepository(url: getSnapshotRepositoryUrl()) {
56+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57+
}
58+
59+
pom.project {
60+
name POM_NAME
61+
packaging POM_PACKAGING
62+
description POM_DESCRIPTION
63+
url POM_URL
64+
65+
scm {
66+
url POM_SCM_URL
67+
connection POM_SCM_CONNECTION
68+
developerConnection POM_SCM_DEV_CONNECTION
69+
}
70+
71+
licenses {
72+
license {
73+
name POM_LICENCE_NAME
74+
url POM_LICENCE_URL
75+
distribution POM_LICENCE_DIST
76+
}
77+
}
78+
79+
developers {
80+
developer {
81+
id POM_DEVELOPER_ID
82+
name POM_DEVELOPER_NAME
83+
}
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
signing {
91+
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92+
sign configurations.archives
93+
}
94+
95+
//task androidJavadocs(type: Javadoc) {
96+
//source = android.sourceSets.main.allJava
97+
//}
98+
99+
//task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
100+
//classifier = 'javadoc'
101+
//from androidJavadocs.destinationDir
102+
//}
103+
104+
task androidSourcesJar(type: Jar) {
105+
classifier = 'sources'
106+
from android.sourceSets.main.java.sourceFiles
107+
}
108+
109+
artifacts {
110+
archives androidSourcesJar
111+
}
112+
}

gradle.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,18 @@ org.gradle.jvmargs=-Xmx1536m
1515
# This option should only be used with decoupled projects. More details, visit
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
18+
19+
VERSION_NAME=0.0.1
20+
VERSION_CODE=1
21+
GROUP=com.github.nipun-birla
22+
23+
POM_DESCRIPTION=A library that does X, Y, and Z
24+
POM_URL=https://github.com/nipun-birla/BoxLoaderView
25+
POM_SCM_URL=https://github.com/nipun-birla/BoxLoaderView
26+
POM_SCM_CONNECTION=scm:[email protected]:nipun-birla/BoxLoaderView.git
27+
POM_SCM_DEV_CONNECTION=scm:[email protected]:nipun-birla/BoxLoaderView.git
28+
POM_LICENCE_NAME=The Apache Software License, Version 2.0
29+
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
30+
POM_LICENCE_DIST=repo
31+
POM_DEVELOPER_ID=nipun-birla
32+
POM_DEVELOPER_NAME=Nipun Birla

0 commit comments

Comments
 (0)