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