Commit 9cf02be6 authored by rahadi's avatar rahadi

Added Pemutakhiran Module

Migrate to id.ac.stis.capi
parent f5cc77af
......@@ -65,18 +65,15 @@ if (secretsFile.exists()) {
android {
compileSdkVersion(26)
buildToolsVersion('26.0.2')
defaultConfig {
applicationId('org.odk.collect.android')
applicationId('id.ac.stis.capi')
minSdkVersion(16)
targetSdkVersion(26)
versionCode LEGACY_BUILD_NUMBER_OFFSET + getMasterCommitCount()
versionName getVersionName()
testInstrumentationRunner('android.support.test.runner.AndroidJUnitRunner')
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
signingConfigs {
release {
if (secrets.getProperty('RELEASE_STORE_FILE')) {
......@@ -87,7 +84,6 @@ android {
}
}
}
buildTypes {
// Release build for all forks
release {
......@@ -103,7 +99,6 @@ android {
testCoverageEnabled(true)
}
}
packagingOptions {
// Pick first occurrence of any files that cause conflicts, as defined
// in common.gradle
......@@ -117,15 +112,15 @@ android {
pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyReader'
pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyWriter'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
javaMaxHeapSize '2048M'
}
productFlavors {
}
}
configurations.all {
......@@ -143,79 +138,74 @@ allprojects {
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile group: 'com.android.support', name: 'appcompat-v7', version: '26.1.0'
compile group: 'com.android.support', name: 'design', version: '26.1.0'
compile group: 'com.android.support', name: 'cardview-v7', version: '26.1.0'
compile group: 'com.android.support', name: 'multidex', version: '1.0.1'
compile group: 'com.google.android.gms', name: 'play-services-analytics', version: '10.0.1'
compile group: 'com.google.android.gms', name: 'play-services-auth', version: '10.0.1'
compile group: 'com.google.android.gms', name: 'play-services-maps', version: '10.0.1'
compile group: 'com.google.android.gms', name: 'play-services-location', version: '10.0.1'
compile(group: 'com.google.code.gson', name: 'gson', version: '2.6.2') {
compile fileTree(include: '*.jar', dir: 'libs')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-analytics:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile('com.google.code.gson:gson:2.6.2') {
exclude group: 'org.apache.httpcomponents'
}
compile group: 'com.google.firebase', name: 'firebase-core', version: '10.0.1'
compile group: 'com.google.firebase', name: 'firebase-crash', version: '10.0.1'
compile(group: 'com.google.http-client', name: 'google-http-client', version: '1.22.0') {
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile('com.google.http-client:google-http-client:1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile(group: 'com.google.oauth-client', name: 'google-oauth-client', version: '1.22.0') {
compile('com.google.oauth-client:google-oauth-client:1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile group: 'commons-io', name: 'commons-io', version: '2.4'
compile group: 'net.sf.kxml', name: 'kxml2', version: '2.3.0'
compile group: 'net.sf.opencsv', name: 'opencsv', version: '2.3'
compile(group: 'org.opendatakit', name: 'opendatakit-javarosa', version: '2.6.1') {
compile 'commons-io:commons-io:2.4'
compile 'net.sf.kxml:kxml2:2.3.0'
compile 'net.sf.opencsv:opencsv:2.3'
compile('org.opendatakit:opendatakit-javarosa:2.6.1') {
exclude module: 'joda-time'
}
compile group: 'org.osmdroid', name: 'osmdroid-android', version: '5.6.4'
compile group: 'org.slf4j', name: 'slf4j-android', version: '1.6.1-RC1'
compile group: 'pub.devrel', name: 'easypermissions', version: '0.2.1'
compile(group: 'com.google.api-client', name: 'google-api-client-android', version: '1.22.0') {
compile 'org.osmdroid:osmdroid-android:5.6.4'
compile 'org.slf4j:slf4j-android:1.6.1-RC1'
compile 'pub.devrel:easypermissions:0.2.1'
compile('com.google.api-client:google-api-client-android:1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile(group: 'com.google.apis', name: 'google-api-services-drive', version: 'v3-rev64-1.22.0') {
compile('com.google.apis:google-api-services-drive:v3-rev64-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile(group: 'com.google.apis', name: 'google-api-services-sheets', version: 'v4-rev463-1.22.0') {
compile('com.google.apis:google-api-services-sheets:v4-rev463-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile group: 'com.jakewharton.timber', name: 'timber', version: '4.5.1'
compile group: 'com.android.support', name: 'customtabs', version: '26.1.0'
compile group: 'com.android.support', name: 'support-v13', version: '26.1.0'
compile group: 'com.google.zxing', name: 'core', version: '3.2.0'
compile group: 'com.journeyapps', name: 'zxing-android-embedded', version: '3.5.0'
compile group: 'net.danlew', name: 'android.joda', version: '2.9.9'
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'com.android.support:customtabs:26.1.0'
compile 'com.android.support:support-v13:26.1.0'
compile 'com.google.zxing:core:3.2.0'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
compile 'net.danlew:android.joda:2.9.9'
// Real LeakCanary for debug builds only: notifications, analysis, etc
debugCompile group: 'com.squareup.leakcanary', name: 'leakcanary-android', version: '1.5.4'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
// No-Op version of LeakCanary for release builds: no notifications, no analysis, nothing
releaseCompile group: 'com.squareup.leakcanary', name: 'leakcanary-android-no-op', version: '1.5.4'
testCompile group: 'com.squareup.leakcanary', name: 'leakcanary-android-no-op', version: '1.5.4'
androidTestCompile group: 'com.squareup.leakcanary', name: 'leakcanary-android-no-op', version: '1.5.4'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
androidTestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
// Testing-only dependencies
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.8.47'
testCompile group: 'org.robolectric', name: 'robolectric', version: '3.4'
testCompile group: 'org.robolectric', name: 'shadows-multidex', version: '3.3.2'
androidTestCompile group: 'org.mockito', name: 'mockito-android', version: '2.11.0'
androidTestCompile(group: 'com.android.support.test', name: 'runner', version: '1.0.1') {
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.8.47'
testCompile 'org.robolectric:robolectric:3.4'
testCompile 'org.robolectric:shadows-multidex:3.3.2'
androidTestCompile 'org.mockito:mockito-android:2.11.0'
androidTestCompile('com.android.support.test:runner:1.0.1') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile(group: 'com.android.support.test.espresso', name: 'espresso-core', version: '3.0.1') {
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1') {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
androidTestCompile(group: 'com.android.support.test.espresso', name: 'espresso-intents', version: '3.0.1') {
androidTestCompile('com.android.support.test.espresso:espresso-intents:3.0.1') {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
androidTestCompile group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '3.6.0'
androidTestCompile 'com.squareup.okhttp3:mockwebserver:3.6.0'
// tempat custom dependencies capi-stis, supaya gampang updatenya
// sudah ada ui-android, peta wb, revalidasi (soon)
compile('com.mikepenz:materialdrawer:6.0.2@aar') {
......
{
"project_info": {
"project_number": "1043539700437",
"firebase_url": "https://capi-stis-95e29.firebaseio.com",
"project_id": "capi-stis-95e29",
"storage_bucket": "capi-stis-95e29.appspot.com"
"project_number": "927934015849",
"firebase_url": "https://vsen-p-1513523629000.firebaseio.com",
"project_id": "vsen-p-1513523629000",
"storage_bucket": "vsen-p-1513523629000.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1043539700437:android:5e1d7c3c296329e8",
"mobilesdk_app_id": "1:927934015849:android:60dd7ea7cc18ca8c",
"android_client_info": {
"package_name": "org.odk.collect.android"
"package_name": "id.ac.stis.capi"
}
},
"oauth_client": [
{
"client_id": "1043539700437-q0vjmegkorlp8enhq26eahj2p0f5dil8.apps.googleusercontent.com",
"client_id": "927934015849-eko7fnolalt14f3vm2qef8mo27eut63t.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC8ocyCpQ_khywwxxF_SHd7aBqW1ME5pbY"
"current_key": "AIzaSyClehd5rnhdWkZmIcWX_rUl8uwNsiRj3YE"
}
],
"services": {
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.odk.collect.android.dao;
package id.ac.stis.capi.dao;
import android.database.Cursor;
import android.support.test.runner.AndroidJUnit4;
......@@ -23,10 +23,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.dto.Form;
import org.odk.collect.android.provider.FormsProviderAPI;
import org.odk.collect.android.utilities.ResetUtility;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.dto.Form;
import id.ac.stis.capi.provider.FormsProviderAPI;
import id.ac.stis.capi.utilities.ResetUtility;
import java.io.File;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.odk.collect.android.dao;
package id.ac.stis.capi.dao;
import android.database.Cursor;
import android.support.test.runner.AndroidJUnit4;
......@@ -23,9 +23,9 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.dto.Instance;
import org.odk.collect.android.provider.InstanceProviderAPI;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.dto.Instance;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import java.util.List;
......
package org.odk.collect.android.tasks;
package id.ac.stis.capi.tasks;
import org.junit.Test;
import org.odk.collect.android.logic.FormDetails;
import org.odk.collect.android.test.MockedServerTest;
import id.ac.stis.capi.logic.FormDetails;
import org.ac.stis.capi.test.MockedServerTest;
import java.util.Map;
......@@ -10,7 +10,7 @@ import okhttp3.mockwebserver.RecordedRequest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.odk.collect.android.test.TestUtils.assertMatches;
import static org.ac.stis.capi.test.TestUtils.assertMatches;
public class DownloadFormListTaskTest extends MockedServerTest {
......
package org.odk.collect.android.tasks;
package id.ac.stis.capi.tasks;
import android.net.Uri;
......@@ -7,20 +7,20 @@ import java.io.File;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.odk.collect.android.dao.InstancesDao;
import org.odk.collect.android.dto.Instance;
import org.odk.collect.android.provider.InstanceProviderAPI;
import org.odk.collect.android.tasks.InstanceUploaderTask.Outcome;
import org.odk.collect.android.test.MockedServerTest;
import id.ac.stis.capi.dao.InstancesDao;
import id.ac.stis.capi.dto.Instance;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.tasks.InstanceUploaderTask.Outcome;
import org.ac.stis.capi.test.MockedServerTest;
import okhttp3.mockwebserver.RecordedRequest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.odk.collect.android.test.TestUtils.assertMatches;
import static org.odk.collect.android.test.TestUtils.cleanUpTempFiles;
import static org.odk.collect.android.test.TestUtils.createTempFile;
import static org.odk.collect.android.test.TestUtils.resetInstancesContentProvider;
import static org.ac.stis.capi.test.TestUtils.assertMatches;
import static org.ac.stis.capi.test.TestUtils.cleanUpTempFiles;
import static org.ac.stis.capi.test.TestUtils.createTempFile;
import static org.ac.stis.capi.test.TestUtils.resetInstancesContentProvider;
public class InstanceUploaderTest extends MockedServerTest {
private InstancesDao dao;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.odk.collect.android.utilities;
package id.ac.stis.capi.utilities;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
......@@ -23,7 +23,7 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.odk.collect.android.application.Collect;
import id.ac.stis.capi.application.Collect;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.odk.collect.android.utilities;
package id.ac.stis.capi.utilities;
import android.content.Context;
import android.support.test.filters.Suppress;
......@@ -23,8 +23,8 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.logic.DatePickerDetails;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.logic.DatePickerDetails;
import java.util.Date;
import java.util.Locale;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.odk.collect.android.utilities;
package id.ac.stis.capi.utilities;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
......@@ -26,9 +26,9 @@ import org.javarosa.form.api.FormEntryPrompt;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.preferences.GeneralSharedPreferences;
import org.odk.collect.android.widgets.ImageWidget;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.preferences.GeneralSharedPreferences;
import id.ac.stis.capi.widgets.ImageWidget;
import java.io.File;
import java.io.IOException;
......@@ -40,7 +40,7 @@ import timber.log.Timber;
import static junit.framework.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.odk.collect.android.utilities.ApplicationConstants.XML_OPENROSA_NAMESPACE;
import static id.ac.stis.capi.utilities.ApplicationConstants.XML_OPENROSA_NAMESPACE;
@RunWith(AndroidJUnit4.class)
public class ImageConverterTest {
......
package org.odk.collect.android.utilities;
package id.ac.stis.capi.utilities;
import org.junit.Before;
import org.junit.Test;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.test.MockedServerTest;
import id.ac.stis.capi.application.Collect;
import org.ac.stis.capi.test.MockedServerTest;
import org.opendatakit.httpclientandroidlib.client.HttpClient;
import org.opendatakit.httpclientandroidlib.client.methods.HttpGet;
import org.opendatakit.httpclientandroidlib.protocol.HttpContext;
......@@ -16,7 +16,7 @@ import okhttp3.mockwebserver.RecordedRequest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.odk.collect.android.test.TestUtils.assertMatches;
import static org.ac.stis.capi.test.TestUtils.assertMatches;
public class WebUtilsTest extends MockedServerTest {
@Before
......
package org.odk.collect.android;
package org.ac.stis.capi;
import android.app.Instrumentation.ActivityResult;
import android.content.Context;
......@@ -24,9 +24,9 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.odk.collect.android.activities.BearingActivity;
import org.odk.collect.android.activities.FormEntryActivity;
import org.odk.collect.android.utilities.ActivityAvailability;
import id.ac.stis.capi.activities.BearingActivity;
import id.ac.stis.capi.activities.FormEntryActivity;
import id.ac.stis.capi.utilities.ActivityAvailability;
import java.io.File;
import java.io.FileOutputStream;
......@@ -60,8 +60,8 @@ import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.startsWith;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import static org.odk.collect.android.activities.FormEntryActivity.BEARING_RESULT;
import static org.odk.collect.android.activities.FormEntryActivity.EXTRA_TESTING_PATH;
import static id.ac.stis.capi.activities.FormEntryActivity.BEARING_RESULT;
import static id.ac.stis.capi.activities.FormEntryActivity.EXTRA_TESTING_PATH;
@RunWith(AndroidJUnit4.class)
@Suppress
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.odk.collect.android;
package org.ac.stis.capi;
import android.content.ContentValues;
import android.content.SharedPreferences;
......@@ -26,12 +26,12 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.preferences.AdminKeys;
import org.odk.collect.android.preferences.PreferenceKeys;
import org.odk.collect.android.provider.FormsProviderAPI;
import org.odk.collect.android.provider.InstanceProviderAPI;
import org.odk.collect.android.utilities.ResetUtility;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.preferences.AdminKeys;
import id.ac.stis.capi.preferences.PreferenceKeys;
import id.ac.stis.capi.provider.FormsProviderAPI;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.utilities.ResetUtility;
import org.osmdroid.config.Configuration;
import java.io.File;
......
package org.odk.collect.android;
package org.ac.stis.capi;
import android.support.test.filters.Suppress;
import android.support.test.runner.AndroidJUnit4;
......@@ -20,9 +20,9 @@ import javax.net.ssl.HttpsURLConnection;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.fail;
import static org.odk.collect.android.utilities.WebUtils.CONNECTION_TIMEOUT;
import static org.odk.collect.android.utilities.WebUtils.createHttpClient;
import static org.odk.collect.android.utilities.WebUtils.createOpenRosaHttpGet;