Skip to content

Commit 5756f25

Browse files
author
Cameron Mace
authored
Initial Project (#1)
* initial project * checkstyle setup * added circleci script * added dependencies gradle file * removed unnecessary idea files * added existing code * added test, resources, and makefile * force ci * disabled package name checkstyle rule * force ci again * added fixtures * removed unused import * run test in sdk only
1 parent 3f9edde commit 5756f25

File tree

375 files changed

+11572
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+11572
-5
lines changed

.gitignore

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ captures/
3434

3535
# Intellij
3636
*.iml
37-
.idea/workspace.xml
38-
.idea/tasks.xml
39-
.idea/gradle.xml
40-
.idea/dictionaries
41-
.idea/libraries
37+
.idea
38+
39+
# MacOS
40+
.DS_Store
4241

4342
# Keystore files
4443
*.jks

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Used for Map Matching
2+
checkstyle:
3+
cd osrm-text-instructions; ./gradlew checkstyle
4+
5+
test-java:
6+
cd osrm-text-instructions; ./gradlew :libjava-osrm-instructions:test
7+
8+
build-release-java:
9+
cd osrm-text-instructions; ./gradlew :libjava-osrm-instructions:assemble
10+
11+
javadoc:
12+
# Java modules
13+
# Output is in ./mapbox/*/build/docs/javadoc
14+
cd osrm-text-instructions; ./gradlew :libjava-osrm-instructions:javadocGeneration
15+
16+
publish-java:
17+
cd osrm-text-instructions; ./gradlew :libjava-osrm-instructions:uploadArchives
18+
19+
publish-local:
20+
# This publishes to ~/.m2/repository/com/mapbox/mapboxsdk
21+
cd osrm-text-instructions; ./gradlew :libjava-osrm-instructions:install
22+
23+
dex-count:
24+
# TODO Setup
25+
26+
libosrm:
27+
rm -rf osrm-text-instructions/libjava-osrm-instructions/src/main/resources/translations osrm-text-instructions/libjava-osrm-instructions/src/test/fixtures/osrm/v5
28+
mkdir -p osrm-text-instructions/libjava-osrm-instructions/src/main/resources/translations osrm-text-instructions/libjava-osrm-instructions/src/test/fixtures/osrm/v5
29+
cp -R ../osrm-text-instructions/languages/translations/* osrm-text-instructions/libjava-osrm-instructions/src/main/resources/translations
30+
cp -R ../osrm-text-instructions/test/fixtures/v5/* osrm-text-instructions/libjava-osrm-instructions/src/test/fixtures/osrm/v5

circle.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/code
5+
docker:
6+
- image: circleci/android:api-25-alpha
7+
environment:
8+
JVM_OPTS: -Xmx3200m
9+
steps:
10+
- checkout
11+
- restore_cache:
12+
key: jars-{{ checksum "osrm-text-instructions/build.gradle" }}-{{ checksum "osrm-text-instructions/app/build.gradle" }}
13+
- run:
14+
name: Download Dependencies
15+
command: cd osrm-text-instructions && ./gradlew androidDependencies
16+
- save_cache:
17+
paths:
18+
- ~/.gradle
19+
key: jars-{{ checksum "osrm-text-instructions/build.gradle" }}-{{ checksum "osrm-text-instructions/app/build.gradle" }}
20+
- run:
21+
name: Check Java code style
22+
command: cd osrm-text-instructions && ./gradlew checkstyle
23+
- run:
24+
name: Run Tests
25+
command: cd osrm-text-instructions && ./gradlew :libjava-osrm-instructions:test
26+
- store_artifacts:
27+
path: osrm-text-instructions/app/build/reports
28+
destination: reports
29+
- store_test_results:
30+
path: osrm-text-instructions/app/build/test-results

osrm-text-instructions/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

osrm-text-instructions/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
6+
defaultConfig {
7+
applicationId "org.project_osrm.instructions.app"
8+
minSdkVersion rootProject.ext.minSdkVersion
9+
targetSdkVersion rootProject.ext.targetSdkVersion
10+
versionCode 1
11+
versionName "0.1.0"
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
// Support libraries
24+
compile rootProject.ext.dep.supportAppcompatV7
25+
compile rootProject.ext.dep.supportConstraintLayout
26+
27+
// Logging
28+
compile rootProject.ext.dep.timber
29+
30+
// Butter Knife
31+
compile rootProject.ext.dep.butterKnife
32+
annotationProcessor rootProject.ext.dep.butterKnifeProcessor
33+
34+
// Leak Canary
35+
debugCompile rootProject.ext.dep.leakCanaryDebug
36+
releaseCompile rootProject.ext.dep.leakCanaryRelease
37+
testCompile rootProject.ext.dep.leakCanaryTest
38+
39+
// Unit Testing
40+
testCompile rootProject.ext.dep.junit
41+
testCompile rootProject.ext.dep.mockito
42+
43+
// Instrumentation testing
44+
androidTestCompile(rootProject.ext.dep.testEspressoCore, {
45+
exclude group: 'com.android.support', module: 'support-annotations'
46+
})
47+
}
48+
49+
apply from: '../checkstyle.gradle'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/cameron/Library/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="org.project_osrm.instructions.app">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
12+
<activity android:name="org.project_osrm.instructions.testapp.MainActivity">
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN"/>
15+
16+
<category android:name="android.intent.category.LAUNCHER"/>
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.project_osrm.instructions.testapp;
2+
3+
import android.support.v7.app.AppCompatActivity;
4+
import android.os.Bundle;
5+
6+
import org.project_osrm.instructions.app.R;
7+
8+
public class MainActivity extends AppCompatActivity {
9+
10+
@Override
11+
protected void onCreate(Bundle savedInstanceState) {
12+
super.onCreate(savedInstanceState);
13+
setContentView(R.layout.activity_main);
14+
}
15+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:width="24dp"
5+
android:height="24dp"
6+
android:viewportHeight="108.0"
7+
android:viewportWidth="108.0">
8+
<path
9+
android:fillColor="#26A69A"
10+
android:pathData="M0,0h108v108h-108z"
11+
android:strokeColor="#66FFFFFF"
12+
android:strokeWidth="0.8"/>
13+
<path
14+
android:fillColor="#00000000"
15+
android:pathData="M19,0L19,108"
16+
android:strokeColor="#33FFFFFF"
17+
android:strokeWidth="0.8"/>
18+
<path
19+
android:fillColor="#00000000"
20+
android:pathData="M9,0L9,108"
21+
android:strokeColor="#66FFFFFF"
22+
android:strokeWidth="0.8"/>
23+
<path
24+
android:fillColor="#00000000"
25+
android:pathData="M39,0L39,108"
26+
android:strokeColor="#66FFFFFF"
27+
android:strokeWidth="0.8"/>
28+
<path
29+
android:fillColor="#00000000"
30+
android:pathData="M29,0L29,108"
31+
android:strokeColor="#66FFFFFF"
32+
android:strokeWidth="0.8"/>
33+
<path
34+
android:fillColor="#00000000"
35+
android:pathData="M59,0L59,108"
36+
android:strokeColor="#66FFFFFF"
37+
android:strokeWidth="0.8"/>
38+
<path
39+
android:fillColor="#00000000"
40+
android:pathData="M49,0L49,108"
41+
android:strokeColor="#66FFFFFF"
42+
android:strokeWidth="0.8"/>
43+
<path
44+
android:fillColor="#00000000"
45+
android:pathData="M79,0L79,108"
46+
android:strokeColor="#66FFFFFF"
47+
android:strokeWidth="0.8"/>
48+
<path
49+
android:fillColor="#00000000"
50+
android:pathData="M69,0L69,108"
51+
android:strokeColor="#66FFFFFF"
52+
android:strokeWidth="0.8"/>
53+
<path
54+
android:fillColor="#00000000"
55+
android:pathData="M89,0L89,108"
56+
android:strokeColor="#33FFFFFF"
57+
android:strokeWidth="0.8"/>
58+
<path
59+
android:fillColor="#00000000"
60+
android:pathData="M99,0L99,108"
61+
android:strokeColor="#66FFFFFF"
62+
android:strokeWidth="0.8"/>
63+
<path
64+
android:fillColor="#00000000"
65+
android:pathData="M0,89L108,89"
66+
android:strokeColor="#33FFFFFF"
67+
android:strokeWidth="0.8"/>
68+
<path
69+
android:fillColor="#00000000"
70+
android:pathData="M0,99L108,99"
71+
android:strokeColor="#66FFFFFF"
72+
android:strokeWidth="0.8"/>
73+
<path
74+
android:fillColor="#00000000"
75+
android:pathData="M0,69L108,69"
76+
android:strokeColor="#66FFFFFF"
77+
android:strokeWidth="0.8"/>
78+
<path
79+
android:fillColor="#00000000"
80+
android:pathData="M0,79L108,79"
81+
android:strokeColor="#66FFFFFF"
82+
android:strokeWidth="0.8"/>
83+
<path
84+
android:fillColor="#00000000"
85+
android:pathData="M0,49L108,49"
86+
android:strokeColor="#66FFFFFF"
87+
android:strokeWidth="0.8"/>
88+
<path
89+
android:fillColor="#00000000"
90+
android:pathData="M0,59L108,59"
91+
android:strokeColor="#66FFFFFF"
92+
android:strokeWidth="0.8"/>
93+
<path
94+
android:fillColor="#00000000"
95+
android:pathData="M0,29L108,29"
96+
android:strokeColor="#66FFFFFF"
97+
android:strokeWidth="0.8"/>
98+
<path
99+
android:fillColor="#00000000"
100+
android:pathData="M0,39L108,39"
101+
android:strokeColor="#66FFFFFF"
102+
android:strokeWidth="0.8"/>
103+
<path
104+
android:fillColor="#00000000"
105+
android:pathData="M0,19L108,19"
106+
android:strokeColor="#33FFFFFF"
107+
android:strokeWidth="0.8"/>
108+
<path
109+
android:fillColor="#00000000"
110+
android:pathData="M0,9L108,9"
111+
android:strokeColor="#66FFFFFF"
112+
android:strokeWidth="0.8"/>
113+
</vector>
114+

0 commit comments

Comments
 (0)