Skip to content

Commit 853114b

Browse files
committed
dd versionCode and versionName values (#47)
1 parent f75b6df commit 853114b

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

libandroid/app/src/main/java/com/mapbox/services/android/testapp/MainActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import android.support.v7.widget.LinearLayoutManager;
77
import android.support.v7.widget.RecyclerView;
88
import android.support.v7.widget.Toolbar;
9+
import android.util.Log;
910
import android.view.LayoutInflater;
1011
import android.view.Menu;
1112
import android.view.MenuItem;
@@ -14,6 +15,7 @@
1415
import android.widget.TextView;
1516
import android.widget.Toast;
1617

18+
import com.mapbox.services.android.BuildConfig;
1719
import com.mapbox.services.android.testapp.directions.DirectionsV4Activity;
1820
import com.mapbox.services.android.testapp.directions.DirectionsV5Activity;
1921
import com.mapbox.services.android.testapp.geocoding.GeocodingReverseActivity;
@@ -32,6 +34,8 @@
3234
*/
3335
public class MainActivity extends AppCompatActivity {
3436

37+
private final static String LOG_TAG = "MainActivity";
38+
3539
private RecyclerView mRecyclerView;
3640
private RecyclerView.Adapter mAdapter;
3741
private RecyclerView.LayoutManager mLayoutManager;
@@ -52,6 +56,10 @@ protected void onCreate(Bundle savedInstanceState) {
5256
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
5357
setSupportActionBar(toolbar);
5458

59+
// Debug information
60+
Log.d(LOG_TAG, "MAS version name: " + BuildConfig.VERSION_NAME);
61+
Log.d(LOG_TAG, "MAS version code: " + BuildConfig.VERSION_CODE);
62+
5563
// RecyclerView
5664
mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);
5765
mRecyclerView.setHasFixedSize(true);

libandroid/lib/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ android {
77
defaultConfig {
88
minSdkVersion 15
99
targetSdkVersion 23
10+
11+
// This should be updated together with gradle.properties
12+
// Last number is 0 for a SNAPSHOT, 1 for a release
13+
versionCode 1 * 1000 + 1 * 100 + 0 * 10 + 0
14+
versionName "1.1.0-SNAPSHOT"
1015
}
1116

1217
compileOptions {

libandroid/lib/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# Version name should be updated in build.gradle too.
12
VERSION_NAME=1.1.0-SNAPSHOT
3+
24
GROUP=com.mapbox.mapboxsdk
35

46
POM_DESCRIPTION=Mapbox Android Services

0 commit comments

Comments
 (0)