Skip to content

Commit

Permalink
2.2.7, hideDonate added, use default project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
friedger committed Nov 18, 2019
1 parent 5627010 commit 4d316b4
Show file tree
Hide file tree
Showing 392 changed files with 346 additions and 320 deletions.
61 changes: 20 additions & 41 deletions FileManager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apply plugin: 'com.android.application'

dependencies {
implementation 'com.github.openintents:distribution:3.0.2'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.1.0'

androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.1.1'
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'
}

android {
Expand All @@ -23,53 +23,32 @@ android {
versionName version_name
minSdkVersion min_sdk_version
targetSdkVersion target_sdk_version
setProperty("archivesBaseName", "$applicationId-$versionName")

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jni.srcDirs = ['jni']
lintOptions {
abortOnError false
}

flavorDimensions "market"

productFlavors {
play {

}

// Move the tests to tests/java, tests/res, etc...
androidTest.setRoot('tests')

// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}

lintOptions {
abortOnError false
foss {

}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = outputFile.name.replace('.apk', "-${versionName}.apk")
output.outputFileName = new File(output.outputFile.parent, fileName).getName()
}
}
}
}
}

Expand Down
Binary file removed FileManager/libs/android-support-v4.jar
Binary file not shown.
Binary file removed FileManager/libs/armeabi-v7a/libaccess.so
Binary file not shown.
Binary file removed FileManager/libs/armeabi/libaccess.so
Binary file not shown.
Binary file removed FileManager/libs/mips/libaccess.so
Binary file not shown.
Binary file removed FileManager/libs/x86/libaccess.so
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.openintents.filemanager.test;
package androidTest.java.org.openintents.filemanager.test;

import android.annotation.TargetApi;
import android.app.Activity;
Expand Down Expand Up @@ -69,7 +69,7 @@ protected boolean matchesSafely(ActivityResult activityResult) {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public ActivityResult getActivityResult() {
T activity = getActivity();
assertThat("Activity did not finish (destroyed: " + activity.isDestroyed() + ")", activity.isFinishing(), is(true));
MatcherAssert.assertThat("Activity did not finish (destroyed: " + activity.isDestroyed() + ")", activity.isFinishing(), Matchers.is(true));


try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.openintents.filemanager.test;
package androidTest.java.org.openintents.filemanager.test;

import androidx.test.espresso.ViewAssertion;
import androidx.test.espresso.matcher.BoundedMatcher;
Expand Down Expand Up @@ -62,7 +62,7 @@ protected static void createDirectory(String path) throws IOException {
}

public static Matcher<View> withResourceName(String resourceName) {
return withResourceName(is(resourceName));
return withResourceName(Matchers.is(resourceName));
}

public static Matcher<View> withResourceName(final Matcher<String> resourceNameMatcher) {
Expand Down Expand Up @@ -122,19 +122,19 @@ protected void clickOnTestDirectory() {
}

protected void clickOnFile(String filename) {
onData(allOf(instanceOf(FileHolder.class), hasName(filename))).perform(click(pressBack()));
Espresso.onData(Matchers.allOf(Matchers.instanceOf(FileHolder.class), hasName(filename))).perform(ViewActions.click(ViewActions.pressBack()));
}

protected void longClickOnFile(String filename) {
onData(allOf(instanceOf(FileHolder.class), hasName(filename))).perform(longClick());
Espresso.onData(Matchers.allOf(Matchers.instanceOf(FileHolder.class), hasName(filename))).perform(ViewActions.longClick());
}

protected void longClickOnBookmark(String filename) {
onData(allOf(instanceOf(BookmarkListAdapter.Bookmark.class), hasBookmarkName(filename))).perform(longClick());
Espresso.onData(Matchers.allOf(Matchers.instanceOf(BookmarkListAdapter.Bookmark.class), hasBookmarkName(filename))).perform(ViewActions.longClick());
}

protected void checkFile(String filename, ViewAssertion viewAssertion) {
onData(hasName(filename)).check(viewAssertion);
Espresso.onData(hasName(filename)).check(viewAssertion);
}

protected BoundedMatcher<Object, FileHolder> hasName(final String filename) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.openintents.filemanager.test;
package androidTest.java.org.openintents.filemanager.test;

import androidx.test.espresso.IdlingResource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.openintents.filemanager.test;
package androidTest.java.org.openintents.filemanager.test;

import android.app.Activity;
import android.app.Instrumentation;
Expand Down Expand Up @@ -228,7 +228,7 @@ public T launchActivity(@Nullable Intent startIntent) {

// Visible for testing
void setInstrumentation(Instrumentation instrumentation) {
mInstrumentation = checkNotNull(instrumentation, "instrumentation cannot be null!");
mInstrumentation = Checks.checkNotNull(instrumentation, "instrumentation cannot be null!");
}

void finishActivity() {
Expand Down
Loading

0 comments on commit 4d316b4

Please sign in to comment.