diff --git a/README.md b/README.md index 5514f580e..f27e762b9 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,17 @@ Quick description of the content in the root folder: |-- androidTest -- Source tree for Android implementation tests |-- test -- Source tree for Java JUnit tests + +## How to contribute +If you’re new to ODK-X you can check out the documentation: +- [https://docs.odk-x.org](https://docs.odk-x.org) + +Once you’re up and running, you can choose an issue to start working on from here:  +- [https://github.com/odk-x/tool-suite-X/issues](https://github.com/odk-x/tool-suite-X/issues) + +Issues tagged as [good first issue](https://github.com/odk-x/tool-suite-X/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) should be a good place to start. + +Pull requests are welcome, though please submit them against the development branch. We prefer verbose descriptions of the change you are submitting. If you are fixing a bug please provide steps to reproduce it or a link to a an issue that provides that information. If you are submitting a new feature please provide a description of the need or a link to a forum discussion about it. + +## Links for users +This document is aimed at helping developers and technical contributors. For information on how to get started as a user of ODK-X, see our [online documentation](https://docs.odk-x.org), or to learn more about the Open Data Kit project, visit [https://odk-x.org](https://odk-x.org). diff --git a/build.gradle b/build.gradle index 034997552..95768edf3 100644 --- a/build.gradle +++ b/build.gradle @@ -2,20 +2,20 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' - classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.9.8' - classpath 'com.google.gms:google-services:4.3.5' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2' + classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.23.4' + classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' } } allprojects { repositories { google() - jcenter() + mavenCentral() ivy { url 'http://cwe.cs.washington.edu:8082/artifactory/libs-demo/' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d1b3a547e..a843c3c44 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip diff --git a/services_app/build.gradle b/services_app/build.gradle index 1502ffa33..d3cf80d5d 100644 --- a/services_app/build.gradle +++ b/services_app/build.gradle @@ -28,7 +28,6 @@ android { versionCode(releaseVersionCode) versionName(versionCodeName) testInstrumentationRunner(instrumentationRunner) - multiDexEnabled true } flavorDimensions "stage", "testing" @@ -119,14 +118,13 @@ dependencies { implementation fileTree(include: '*.jar', dir: 'libs') implementation 'androidx.annotation:annotation:1.2.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.preference:preference:1.1.1' - implementation 'androidx.fragment:fragment:1.3.2' - implementation 'com.google.android.material:material:1.3.0' - implementation 'com.google.firebase:firebase-analytics:18.0.2' - implementation 'com.google.firebase:firebase-crashlytics:17.4.1' + implementation 'androidx.fragment:fragment:1.3.6' + implementation 'com.google.android.material:material:1.4.0' + implementation 'com.google.firebase:firebase-analytics:19.0.2' + implementation 'com.google.firebase:firebase-crashlytics:18.2.3' - implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation group: 'com.google.zxing', name: 'core', version: '3.3.0' @@ -144,8 +142,8 @@ dependencies { } // Testing-only dependencies - androidTestImplementation 'androidx.test:runner:1.3.0' - androidTestImplementation 'androidx.test:rules:1.3.0' + androidTestImplementation 'androidx.test:runner:1.4.0' + androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation fileTree(include: '*.jar', dir: 'libs') androidTestImplementation 'androidx.annotation:annotation:1.2.0' diff --git a/services_app/src/main/java/org/opendatakit/services/application/Services.java b/services_app/src/main/java/org/opendatakit/services/application/Services.java index e221b85cc..7e35e7afe 100644 --- a/services_app/src/main/java/org/opendatakit/services/application/Services.java +++ b/services_app/src/main/java/org/opendatakit/services/application/Services.java @@ -15,22 +15,16 @@ package org.opendatakit.services.application; import android.content.Context; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.content.res.Configuration; -import android.util.Log; - -import androidx.multidex.MultiDexApplication; import com.google.firebase.analytics.FirebaseAnalytics; import org.opendatakit.application.IToolAware; -import org.opendatakit.logging.WebLogger; +import org.opendatakit.application.ToolAwareApplication; import org.opendatakit.services.R; import java.lang.ref.WeakReference; -public final class Services extends MultiDexApplication implements IToolAware { +public final class Services extends ToolAwareApplication implements IToolAware { private static final String t = Services.class.getSimpleName(); @@ -50,64 +44,6 @@ public void onCreate() { analytics.logEvent(FirebaseAnalytics.Event.APP_OPEN, null); } - @Override - public void onConfigurationChanged(Configuration newConfig) { - super.onConfigurationChanged(newConfig); - Log.i(t, "onConfigurationChanged"); - } - - @Override - public void onTerminate() { - WebLogger.closeAll(); - super.onTerminate(); - Log.i(t, "onTerminate"); - } - - /** - * The tool name is the name of the package after the org.opendatakit. prefix. - * - * @return the tool name. - */ - @Override - public String getToolName() { - String packageName = getPackageName(); - String[] parts = packageName.split("\\."); - return parts[2]; - } - - @Override - public String getVersionCodeString() { - try { - PackageInfo pinfo; - pinfo = getPackageManager().getPackageInfo(getPackageName(), 0); - int versionNumber = pinfo.versionCode; - return Integer.toString(versionNumber); - } catch (PackageManager.NameNotFoundException e) { - e.printStackTrace(); - return ""; - } - } - - @Override - public String getVersionDetail() { - String versionDetail = ""; - try { - PackageInfo pinfo; - pinfo = getPackageManager().getPackageInfo(getPackageName(), 0); - String versionName = pinfo.versionName; - versionDetail = " " + versionName; - } catch (PackageManager.NameNotFoundException e) { - e.printStackTrace(); - } - return versionDetail; - } - - @Override - public String getVersionedToolName() { - String versionDetail = this.getVersionDetail(); - return getString(getApkDisplayNameResourceId()) + versionDetail; - } - @Deprecated public static Context _please_dont_use_getInstance() { return singleton.get(); } diff --git a/settings.gradle b/settings.gradle index dc0aff044..65a7ef6fd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,76 +1,33 @@ -gradle.ext.gradleConfigVersion = 150 - +gradle.ext.gradleConfigVersion = 153 if (!gradle.ext.has('workspacePath')) { - - def env = System.getProperties(); - - logger.warn("services/settings.gradle System.getProperties().stringPropertyNames(): " + env - - .stringPropertyNames()); - - def path = System.getProperty('com.android.studio.gradle.project.path'); - - if (path != null) { - - logger.warn("services/settings.gradle Found value for System.getProperty('com.android" + - - ".studio.gradle.project.path')"); - - gradle.ext.workspacePath = (new File(path)).getParentFile().getAbsolutePath(); - - } else { - - logger.warn("services/settings.gradle No value found for System.getProperty('com.android" + - - ".studio.gradle.project.path')"); - - gradle.ext.workspacePath = new File("..").getAbsolutePath(); - - } - + logger.warn("rootDir: " + rootDir.getAbsolutePath()); + gradle.ext.workspacePath = rootDir.getParentFile().getAbsolutePath(); } - - logger.warn('services/settings.gradle -- gradle.ext.workspacePath: ' + gradle.ext.workspacePath) - - gradle.ext.local = gradle.ext.workspacePath + '/gradle-config/remote.gradle' - gradle.ext.remote = 'https://raw.githubusercontent.com/opendatakit/gradle-config/' + gradle.ext.gradleConfigVersion + '/remote.gradle' - gradle.ext.useLocal = true // set to false to always build against remote artifacts - if ((new File(gradle.ext.local)).exists()) { - gradle.ext.useLocalPaths = true - apply from: gradle.ext.local - } else { - gradle.ext.useLocalPaths = false - apply from: gradle.ext.remote - } settingsScripts.each { - apply from: it - } include(servicesProjectChild) - - if (libraryProjectPath.exists() && gradle.ext.useLocal) { // check if local library project is present @@ -80,4 +37,3 @@ if (libraryProjectPath.exists() && gradle.ext.useLocal) { include libraryProjectName project(libraryProjectName).setProjectDir(libraryProjectPath) // set local location } -