Skip to content

Commit

Permalink
Add new flavor and fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Bernardi committed Feb 3, 2017
1 parent c2b4f21 commit 69873d4
Show file tree
Hide file tree
Showing 75 changed files with 469 additions and 1,776 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## Changelog
[3.0.2]

- Empty value are not saved on OSM Server
- All changeset are now marked as created by OSM Contributor

[3.0.0-beta.1]

- OAuth support / Sign-in with Google
Expand Down
40 changes: 32 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
appVersion = "3.0.1"
appVersion = "3.0.2"
androidSupportVersion = '25.1.0'
playServicesVersion = '7.8.0'
daggerVersion = '2.0'
Expand Down Expand Up @@ -99,7 +99,7 @@ android {
applicationId "io.mapsquare.osmcontributor"
minSdkVersion 15
targetSdkVersion 25
versionCode 21
versionCode 22
versionName appVersion
multiDexEnabled true
ndk {
Expand All @@ -117,11 +117,15 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

buildConfigField "String", "BASE_OSM_URL", '"http://api.openstreetmap.org/api/0.6/"'
}

debug {
applicationIdSuffix ".debug"
versionNameSuffix ".debug-1"
versionNameSuffix ".debug-2"

buildConfigField "String", "BASE_OSM_URL", '"http://api06.dev.openstreetmap.org/api/0.6/"'
}
}

Expand All @@ -146,6 +150,31 @@ android {
buildConfigField "String", "FLICKR_TOKEN_SECRET", '"' + loadPropertiesFile("conf.properties").getProperty("flickr_token_secret") + '"'
buildConfigField "String", "MAPBOX_TOKEN", '"' + loadPropertiesFile("conf.properties").getProperty("mapbox_token") + '"'
}

bus {
applicationIdSuffix ".bus"
versionName appVersion
versionCode 1

buildConfigField "String", "CRASHLYTICS_PACKAGE_NAME", '"io.mapsquare.osmcontributor.store"'
buildConfigField "int", "DEFAULT_ZOOM", "16"
buildConfigField "int", "ZOOM_VECTORIAL", "18"
buildConfigField "int", "ZOOM_MAX_PROVIDER", "19"
buildConfigField "float", "ZOOM_MARKER_MIN", "12.5f"
buildConfigField "float", "ZOOM_MAX", "21.99f"
buildConfigField "double", "CENTER_LAT", "48.858370"
buildConfigField "double", "CENTER_LNG", "2.294481"
buildConfigField "String", "MAP_URL", '"http://tile.openstreetmap.org/{z}/{x}/{y}.png"'
buildConfigField "String", "MAP_STYLE_URL", '"https://gist.githubusercontent.com/anonymous/c1fdbffff5c4e25eb267696e8247dec1/raw/1590b94bfc01433b706d51cf117506a760d14199/57a357f3e4b0dc55a4ea6ffa.json"'
buildConfigField "String", "MAP_STYLE", '"asset://mapnik.json"'
buildConfigField "String", "BASE_OSM_URL", osmUrl()
buildConfigField "String", "BASE_OVERPASS_URL", '"http://overpass-api.de/api/interpreter"'
buildConfigField "String", "FLICKR_API_KEY", '"' + loadPropertiesFile("conf.properties").getProperty("flickr_api_key") + '"'
buildConfigField "String", "FLICKR_API_SECRET", '"' + loadPropertiesFile("conf.properties").getProperty("flickr_api_secret") + '"'
buildConfigField "String", "FLICKR_TOKEN", '"' + loadPropertiesFile("conf.properties").getProperty("flickr_token") + '"'
buildConfigField "String", "FLICKR_TOKEN_SECRET", '"' + loadPropertiesFile("conf.properties").getProperty("flickr_token_secret") + '"'
buildConfigField "String", "MAPBOX_TOKEN", '"' + loadPropertiesFile("conf.properties").getProperty("mapbox_token") + '"'
}
}
}

Expand Down Expand Up @@ -212,11 +241,6 @@ dependencies {
compile "de.psdev.licensesdialog:licensesdialog:$licensesdialogVersion"
compile(name:"arpigl-release-$arpiglVersion", ext:"aar")

// Tests
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
testCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"

compile "com.facebook.stetho:stetho:$stethoVersion"

testCompile 'junit:junit:4.12'
Expand Down
181 changes: 181 additions & 0 deletions src/bus/assets/h2geo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"name": {
"default": "Bus preset",
"en": "Bus preset",
"fr": "Preset bus"
},
"version": "0.1",
"author": "Hugo Bernardi",
"link": "https://github.com/jawg/h2geo-presets",
"description": {
"default": "The only profile you need to contribute your favourite bus amenities.",
"en": "The only profile you need to contribute your favourite bus amenities.",
"fr": "Le seul profil dont vous aurez besoin pour contribuer des données utiles liées aux arrêts de bus."
},
"image": "https://wiki.openstreetmap.org/w/images/thumb/c/ca/Citadis402Grenoble_citeinternationale.jpg/480px-Citadis402Grenoble_citeinternationale.jpg",
"groups": [
{
"name": {
"default": "Bus group",
"en": "Bus group",
"fr": "Groupe bus"
},
"icon": "http://static.directmatin.fr/sites/default/files/velib_frein_arriere.jpg",
"url": "https://wiki.openstreetmap.org/wiki/Bicycle",
"items": [
{
"name": "public_transport=platform",
"url": "https://wiki.openstreetmap.org/wiki/Tag:amenity=bicycle_parking",
"label": {
"default": "Bus stop",
"en": "Bus stop",
"fr": "Arrêt de bus"
},
"description": {
"default": "A bus stop.",
"en": "A bus stop.",
"fr": "Un arrêt de bus."
},
"keywords": {
"default": [
"bus stop"
],
"en": [
"bus stop"
],
"fr": [
"Arrêt de bus"
]
},
"tags": [
{
"key": "public_transport",
"value": "platform",
"type": "CONSTANT"
},
{
"key": "name",
"type": "TEXT"
},
{
"key": "shelter",
"type": "SINGLE_CHOICE",
"values": [
{
"yes": {
"default": "Yes",
"fr": "Oui",
"en": "Yes"
}
},
{
"no": {
"default": "No",
"fr": "Non",
"en": "No"
}
}
]
},
{
"key": "bench",
"type": "SINGLE_CHOICE",
"values": [
{
"yes": {
"default": "Yes",
"fr": "Oui",
"en": "Yes"
}
},
{
"no": {
"default": "No",
"fr": "Non",
"en": "No"
}
}
]
}
]
},
{
"name": "highway=bus_stop",
"url": "https://wiki.openstreetmap.org/wiki/Tag:amenity=bicycle_parking",
"label": {
"default": "Bus stop (Obsolete)",
"en": "Bus stop (Obsolete)",
"fr": "Arrêt de bus (Obsolète)"
},
"description": {
"default": "A bus stop.",
"en": "A bus stop.",
"fr": "Un arrêt de bus."
},
"keywords": {
"default": [
"bus stop"
],
"en": [
"bus stop"
],
"fr": [
"Arrêt de bus"
]
},
"tags": [
{
"key": "highway",
"value": "bus_stop",
"type": "CONSTANT"
},
{
"key": "name",
"type": "TEXT"
},
{
"key": "shelter",
"type": "SINGLE_CHOICE",
"values": [
{
"yes": {
"default": "Yes",
"fr": "Oui",
"en": "Yes"
}
},
{
"no": {
"default": "No",
"fr": "Non",
"en": "No"
}
}
]
},
{
"key": "bench",
"type": "SINGLE_CHOICE",
"values": [
{
"yes": {
"default": "Yes",
"fr": "Oui",
"en": "Yes"
}
},
{
"no": {
"default": "No",
"fr": "Non",
"en": "No"
}
}
]
}
]
}
]
}
]
}
Binary file added src/bus/res/drawable-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/drawable-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/drawable-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/drawable-xxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions src/bus/res/menu/drawer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 eBusiness Information
This file is part of OSM Contributor.
OSM Contributor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OSM Contributor is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group
android:id="@+id/sync"
android:checkableBehavior="all"
android:visible="true">
<item
android:id="@+id/save_changes"
android:checked="false"
android:icon="@android:drawable/ic_menu_save"
android:title="@string/save_now"/>
</group>

<group
android:id="@+id/drawer_options_group"
android:checkableBehavior="none">

<item
android:id="@+id/manage_poi_types"
android:title="@string/manage_poi_types"
android:visible="false"/>

<item
android:id="@+id/edit_way"
android:title="@string/edit_way"
android:visible="false"/>

<item
android:id="@+id/arpi_view"
android:title="@string/title_3d_view"
android:visible="false"/>

<item
android:id="@+id/switch_style"
android:title="@string/switch_style_satellite"
android:visible="false"/>

<item
android:id="@+id/profile_load"
android:title="@string/profile_load"
android:visible="false"/>

<item
android:id="@+id/offline_regions"
android:title="@string/offline_regions"/>

<item
android:id="@+id/replay_tuto_menu"
android:title="@string/replay_tuto"
android:visible="false"/>

<item
android:id="@+id/preferences_menu"
android:title="@string/title_activity_my_preferences"/>

<item
android:id="@+id/about_menu"
android:title="@string/about_title"/>
</group>
</menu>
Binary file added src/bus/res/mipmap-hdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/mipmap-mdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/mipmap-xhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/mipmap-xxhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bus/res/mipmap-xxxhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/bus/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="name" translatable="false">Osm Contributor for Bus</string>
</resources>
Loading

0 comments on commit 69873d4

Please sign in to comment.