Skip to content

Commit

Permalink
Merge pull request #216 from odk-x/development
Browse files Browse the repository at this point in the history
prepare for pre-release
  • Loading branch information
wbrunette authored Oct 18, 2021
2 parents 57cb6ed + b5ca918 commit f51328b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 129 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 7 additions & 9 deletions services_app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ android {
versionCode(releaseVersionCode)
versionName(versionCodeName)
testInstrumentationRunner(instrumentationRunner)
multiDexEnabled true
}

flavorDimensions "stage", "testing"
Expand Down Expand Up @@ -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'
Expand All @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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();
}
Expand Down
50 changes: 3 additions & 47 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -80,4 +37,3 @@ if (libraryProjectPath.exists() && gradle.ext.useLocal) {
include libraryProjectName
project(libraryProjectName).setProjectDir(libraryProjectPath) // set local location
}

0 comments on commit f51328b

Please sign in to comment.