Compare commits
1 Commits
create-pul
...
badAttempt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f64449167 |
@@ -26,6 +26,19 @@ android {
|
|||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
resourceConfigurations += ["ar", "bg", "bn", "bn-rIN", "bs", "cs", "da", "de", "el-rGR", "en", "eo", "es", "es-rAR", "fi", "fr", "he-rIL", "hi", "hr", "hu", "in-rID", "is", "it", "ja", "ko", "lt", "lv", "nb-rNO", "nl", "oc", "pl", "pt", "ro-rRO", "ru", "sk", "sl", "sv", "tr", "uk", "zh-rTW", "zh-rCN"]
|
resourceConfigurations += ["ar", "bg", "bn", "bn-rIN", "bs", "cs", "da", "de", "el-rGR", "en", "eo", "es", "es-rAR", "fi", "fr", "he-rIL", "hi", "hr", "hu", "in-rID", "is", "it", "ja", "ko", "lt", "lv", "nb-rNO", "nl", "oc", "pl", "pt", "ro-rRO", "ru", "sk", "sl", "sv", "tr", "uk", "zh-rTW", "zh-rCN"]
|
||||||
|
|
||||||
|
//testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
flavorDimensions "version"
|
||||||
|
productFlavors {
|
||||||
|
fdroid {
|
||||||
|
dimension "version"
|
||||||
|
}
|
||||||
|
screengrab {
|
||||||
|
dimension "version"
|
||||||
|
applicationIdSuffix = ".screengrab"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -113,6 +126,12 @@ dependencies {
|
|||||||
testImplementation 'androidx.test:core:1.5.0'
|
testImplementation 'androidx.test:core:1.5.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
testImplementation 'org.robolectric:robolectric:4.10.3'
|
testImplementation 'org.robolectric:robolectric:4.10.3'
|
||||||
|
|
||||||
|
// Screenshots
|
||||||
|
testImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||||
|
testImplementation 'com.android.support.test:rules:1.0.2'
|
||||||
|
testImplementation 'com.android.support.test:runner:1.0.2'
|
||||||
|
testImplementation 'tools.fastlane:screengrab:2.1.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(SpotBugsTask) {
|
tasks.withType(SpotBugsTask) {
|
||||||
|
|||||||
17
app/src/screengrab/AndroidManifest.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<!-- Allows storing screenshots on external storage, where it can be accessed by ADB -->
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
|
||||||
|
|
||||||
|
<!-- Allows changing locales -->
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.CHANGE_CONFIGURATION"
|
||||||
|
tools:ignore="ProtectedPermissions" />
|
||||||
|
|
||||||
|
<!-- Allows changing SystemUI demo mode -->
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.DUMP"
|
||||||
|
tools:ignore="ProtectedPermissions" />
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package protect.card_locker.screenshot;
|
||||||
|
|
||||||
|
import android.support.test.rule.ActivityTestRule;
|
||||||
|
|
||||||
|
import androidx.test.core.app.ActivityScenario;
|
||||||
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
|
|
||||||
|
import org.junit.ClassRule;
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.rules.TestRule;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.junit.runners.JUnit4;
|
||||||
|
|
||||||
|
import protect.card_locker.MainActivity;
|
||||||
|
import tools.fastlane.screengrab.Screengrab;
|
||||||
|
import tools.fastlane.screengrab.locale.LocaleTestRule;
|
||||||
|
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ScreenshotCreation {
|
||||||
|
@ClassRule
|
||||||
|
public static final TestRule classRule = new LocaleTestRule();
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public final ActivityTestRule<MainActivity> activityTestRule = new ActivityTestRule<>(MainActivity.class);
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void takeScreenshot() throws Exception {
|
||||||
|
Screengrab.screenshot("mainactivity");
|
||||||
|
}
|
||||||
|
}
|
||||||
48
fastlane/README.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
fastlane documentation
|
||||||
|
----
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
Make sure you have the latest version of the Xcode command line tools installed:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
xcode-select --install
|
||||||
|
```
|
||||||
|
|
||||||
|
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
|
||||||
|
|
||||||
|
# Available Actions
|
||||||
|
|
||||||
|
## Android
|
||||||
|
|
||||||
|
### android test
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android test
|
||||||
|
```
|
||||||
|
|
||||||
|
Runs all the tests
|
||||||
|
|
||||||
|
### android beta
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android beta
|
||||||
|
```
|
||||||
|
|
||||||
|
Submit a new Beta Build to Crashlytics Beta
|
||||||
|
|
||||||
|
### android deploy
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy a new version to the Google Play
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
|
||||||
|
|
||||||
|
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
|
||||||
|
|
||||||
|
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
|
||||||
18
fastlane/Screengrabfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# remove the leading '#' to uncomment lines
|
||||||
|
|
||||||
|
app_package_name('me.hackerchick.catima.screengrab.debug')
|
||||||
|
use_tests_in_packages(['protect.card_locker.screenshot'])
|
||||||
|
|
||||||
|
app_apk_path('app/build/outputs/apk/screengrab/debug/app-screengrab-debug.apk')
|
||||||
|
tests_apk_path('app/build/outputs/apk/androidTest/screengrab/debug/app-screengrab-debug-androidTest.apk')
|
||||||
|
|
||||||
|
locales(['en-US', 'fr-FR', 'it-IT'])
|
||||||
|
|
||||||
|
# clear all previously generated screenshots in your local output directory before creating new ones
|
||||||
|
clear_previous_screenshots(true)
|
||||||
|
|
||||||
|
# For more information about all available options run
|
||||||
|
# fastlane screengrab --help
|
||||||
|
|
||||||
|
#test_instrumentation_runner('android.test.InstrumentationTestRunner')
|
||||||
|
#org.robolectric.RobolectricTestRunner')
|
||||||
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 53 KiB |
13
fastlane/report.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="fastlane.lanes">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000433854">
|
||||||
|
|
||||||
|
</testcase>
|
||||||
|
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||