Skip to content

Commit

Permalink
Places module (#204)
Browse files Browse the repository at this point in the history
* Rename module library to mapzen-android-sdk

* Rename module sample to mapzen-android-sdk-sample

* Add core module

* Add places module

* Deploy places module

* mapzen-android-sdk & mapzen-places-api depend on core module

* Create places sample app module

* Update sample app deploy scripts

* Move sample projects into samples

* Update deploy paths for new sample app locations

* Deploy core module and update places & sdk to depend on maven artifact

* Move label pick classes
  • Loading branch information
sarahsnow1 authored and ecgreb committed Dec 12, 2016
1 parent 744c3da commit 61968d0
Show file tree
Hide file tree
Showing 184 changed files with 462 additions and 48 deletions.
20 changes: 10 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[submodule "library/src/main/assets/styles/bubble-wrap"]
path = library/src/main/assets/styles/bubble-wrap
[submodule "mapzen-android-sdk/src/main/assets/styles/bubble-wrap"]
path = mapzen-android-sdk/src/main/assets/styles/bubble-wrap
url = https://github.com/tangrams/bubble-wrap.git
[submodule "library/src/main/assets/styles/refill-more-labels"]
path = library/src/main/assets/styles/refill-more-labels
[submodule "mapzen-android-sdk/src/main/assets/styles/refill-more-labels"]
path = mapzen-android-sdk/src/main/assets/styles/refill-more-labels
url = https://github.com/tangrams/refill-style-more-labels.git
[submodule "library/src/main/assets/styles/cinnabar-more-labels"]
path = library/src/main/assets/styles/cinnabar-more-labels
[submodule "mapzen-android-sdk/src/main/assets/styles/cinnabar-more-labels"]
path = mapzen-android-sdk/src/main/assets/styles/cinnabar-more-labels
url = https://github.com/tangrams/cinnabar-style-more-labels.git
[submodule "library/src/main/assets/styles/walkabout-style-more-labels"]
path = library/src/main/assets/styles/walkabout-style-more-labels
[submodule "mapzen-android-sdk/src/main/assets/styles/walkabout-style-more-labels"]
path = mapzen-android-sdk/src/main/assets/styles/walkabout-style-more-labels
url = https://github.com/tangrams/walkabout-style-more-labels.git
[submodule "library/src/main/assets/styles/zinc-style-more-labels"]
path = library/src/main/assets/styles/zinc-style-more-labels
[submodule "mapzen-android-sdk/src/main/assets/styles/zinc-style-more-labels"]
path = mapzen-android-sdk/src/main/assets/styles/zinc-style-more-labels
url = https://github.com/tangrams/zinc-style-more-labels.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ The Mapzen Android SDK incorporates several stand-alone libraries for map render
- [Lost](https://github.com/mapzen/lost)- Drop-in replacement for Google Play services Location APIs

## Sample
For a working example please refer to the SDK [sample app](https://github.com/mapzen/android/tree/master/sample).
For a working example please refer to the SDK [sample app](https://github.com/mapzen/android/tree/master/mapzen-android-sdk-sample).
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.android.tools.build:gradle:2.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
6 changes: 3 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ deployment:
branch: master
commands:
- ./gradlew uploadArchives -PsonatypeUsername=$SONATYPE_NEXUS_SNAPSHOTS_USERNAME -PsonatypePassword=$SONATYPE_NEXUS_SNAPSHOTS_PASSWORD
- scripts/deploy-sample-app.sh
- ./gradlew aarSize countReleaseDexMethods permissions library:dependencies --configuration compile
- scripts/deploy-android-sdk-sample-app.sh
- scripts/deploy-places-api-sample-app.sh
- ./gradlew aarSize countReleaseDexMethods permissions mapzen-android-sdk:dependencies --configuration compile
- pip install 'Circle-Tickler == 1.0.1'
- tickle-circle mapzen mapzen-docs-generator master $CIRCLE_TOKEN

File renamed without changes.
86 changes: 86 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'net.researchgate:gradle-release:2.4.0'
}
}

apply plugin: 'com.android.library'
apply plugin: 'checkstyle'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'net.researchgate.release'

group = GROUP
version = VERSION_NAME
project.archivesBaseName = POM_ARTIFACT_ID

release {
tagTemplate = 'mapzen-core${version}'
versionPropertyFile = 'gradle.properties'
versionProperties = ['VERSION_NAME']
newVersionCommitMessage = '[Gradle Release Plugin] - core new version commit:'
}

afterReleaseBuild.dependsOn uploadArchives

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

testOptions {
unitTests.returnDefaultValues = true
}

lintOptions {
abortOnError false
}
}

tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
}

task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
source 'src'
include '**/*.java'
exclude '**/gen/**'

classpath = files()
}

task verify(dependsOn: ['compileDebugSources',
'test',
'checkstyle',
'lint'])

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')

dependencies {

}
22 changes: 22 additions & 0 deletions core/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version=0.0.1-SNAPSHOT

POM_ARTIFACT_ID=mapzen-core
POM_NAME=Mapzen Android Core
POM_PACKAGING=aar

GROUP=com.mapzen
VERSION_NAME=0.0.1-SNAPSHOT

POM_DESCRIPTION=Core classes used by the Mapzen Android SDK and Mapzen Places API.

POM_URL=https://github.com/mapzen/android
POM_SCM_URL=http://github.com/mapzen/android
POM_SCM_CONNECTION=scm:git:git://github.com/mapzen/android.git
POM_SCM_DEV_CONNECTION=scm:git:[email protected]:mapzen/android.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=Mapzen
POM_DEVELOPER_NAME=Mapzen
17 changes: 17 additions & 0 deletions core/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/sarahlensing/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
11 changes: 11 additions & 0 deletions core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mapzen.core">

<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>

</application>

</manifest>
3 changes: 3 additions & 0 deletions core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">core</string>
</resources>
File renamed without changes.
9 changes: 6 additions & 3 deletions library/build.gradle → mapzen-android-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ version = VERSION_NAME
project.archivesBaseName = POM_ARTIFACT_ID

release {
tagTemplate = 'v${version}'
versionPropertyFile = '../gradle.properties'
tagTemplate = 'mapzen-android-sdk${version}'
versionPropertyFile = 'gradle.properties'
versionProperties = ['VERSION_NAME']
newVersionCommitMessage = '[Gradle Release Plugin] - mapzen-android-sdk new version commit:'
}

afterReleaseBuild.dependsOn uploadArchives
Expand Down Expand Up @@ -83,7 +84,7 @@ task verify(dependsOn: ['compileDebugSources',
'lint'])

task submodules {
def folder = new File( 'library/src/main/assets/styles/walkabout-style-more-labels/walkabout-style-more-labels.yaml' )
def folder = new File( 'mapzen-android-sdk/src/main/assets/styles/walkabout-style-more-labels/walkabout-style-more-labels.yaml' )
if(!folder.exists()) {
throw new GradleException("Submodules aren't present, please run:\n`git submodule init`, " +
"\n`git submodule update`\nfrom your root directory")
Expand All @@ -97,6 +98,8 @@ assemble.doFirst {

dependencies {
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.mapzen:mapzen-core:0.0.1-SNAPSHOT'

compile "com.mapzen.tangram:tangram:$tangram_version"
compile 'com.mapzen.android:lost:2.1.2'
compile 'com.mapzen:on-the-road:1.1.1'
Expand Down
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.
1 change: 1 addition & 0 deletions mapzen-places-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
73 changes: 73 additions & 0 deletions mapzen-places-api/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'net.researchgate:gradle-release:2.4.0'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.1'
}
}

apply plugin: 'com.android.library'
apply plugin: 'checkstyle'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'net.researchgate.release'

group = GROUP
version = VERSION_NAME
project.archivesBaseName = POM_ARTIFACT_ID

release {
tagTemplate = 'mapzen-places-api-${version}'
versionPropertyFile = 'gradle.properties'
versionProperties = ['VERSION_NAME']
newVersionCommitMessage = '[Gradle Release Plugin] - mapzen-places-api new version commit:'
}

afterReleaseBuild.dependsOn uploadArchives


android {
compileSdkVersion 24
buildToolsVersion "24.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}

tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
}

dependencies {
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.mapzen:mapzen-core:0.0.1-SNAPSHOT'

testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:1.7.1'
}


apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
22 changes: 22 additions & 0 deletions mapzen-places-api/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version=0.0.1-SNAPSHOT

POM_ARTIFACT_ID=mapzen-places-api
POM_NAME=Mapzen Places API
POM_PACKAGING=aar

GROUP=com.mapzen
VERSION_NAME=0.0.1-SNAPSHOT

POM_DESCRIPTION=Mapzen Places API.

POM_URL=https://github.com/mapzen/android
POM_SCM_URL=http://github.com/mapzen/android
POM_SCM_CONNECTION=scm:git:git://github.com/mapzen/android.git
POM_SCM_DEV_CONNECTION=scm:git:[email protected]:mapzen/android.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=Mapzen
POM_DEVELOPER_NAME=Mapzen
17 changes: 17 additions & 0 deletions mapzen-places-api/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/sarahlensing/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
11 changes: 11 additions & 0 deletions mapzen-places-api/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mapzen.places.api">

<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>

</application>

</manifest>
3 changes: 3 additions & 0 deletions mapzen-places-api/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">mapzen-places-api</string>
</resources>
1 change: 1 addition & 0 deletions samples/mapzen-android-sdk-sample/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
buildToolsVersion "24.0.3"

defaultConfig {
applicationId "com.mapzen.android.sample"
applicationId "com.mapzen.android.sdk.sample"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
Expand Down Expand Up @@ -41,7 +41,7 @@ task verify(dependsOn: ['test',
'lint'])

dependencies {
compile(project(':library')) {
compile(project(':mapzen-android-sdk')) {
transitive = true;
}
compile 'com.android.support:appcompat-v7:24.2.1'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.mapzen.android.sample"
<manifest package="com.mapzen.android.sdk.sample"
xmlns:android="http://schemas.android.com/apk/res/android">

<application
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapzen.android.sample;
package com.mapzen.android.sdk.sample;

import com.mapzen.android.graphics.MapFragment;
import com.mapzen.android.graphics.MapzenMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapzen.android.sample;
package com.mapzen.android.sdk.sample;

import com.mapzen.android.graphics.MapFragment;
import com.mapzen.android.graphics.MapzenMap;
Expand Down
Loading

0 comments on commit 61968d0

Please sign in to comment.