Skip to content

Commit

Permalink
configure Fastlane for screenshot generation
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Mar 29, 2019
1 parent e78f53c commit 0e50274
Show file tree
Hide file tree
Showing 28 changed files with 1,047 additions and 423 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ branded.gradle
.idea/workspace.xml
.idea/tasks.xml
.idea/libraries
.idea/caches
.idea/codeStyles
.gradle/
res/values/com_crashlytics_export_strings.xml
assets/crashlytics-build.properties
infer-out/

#fastlane
key.json
fastlane/.env
fastlane/report.xml
fastlane/metadata/android/en-US/images
fastlane/metadata/android/en-US/changelogs
fastlane/metadata/enterprise/en-US/images
fastlane/metadata/enterprise/en-US/changelogs
3 changes: 0 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" tools:ignore="ProtectedPermissions" />

<supports-screens
android:anyDensity="true"
Expand Down
24 changes: 10 additions & 14 deletions tests/AndroidManifest.xml → AndroidManifestMock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.irccloud.android.test"
android:versionCode="1"
android:versionName="1.0" >

<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.irccloud.android" />
xmlns:tools="http://schemas.android.com/tools">
<!-- Allows unlocking your device and activating its screen so UI tests can succeed -->
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="android.test.runner" />
</application>
<!-- Allows for storing and retrieving screenshots -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!-- Allows changing locales -->
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" tools:ignore="ProtectedPermissions" />
</manifest>
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
159 changes: 159 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.3)
babosa (1.0.2)
claide (1.0.2)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.2)
emoji_regex (1.0.1)
excon (0.62.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.119.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.45.0, < 1.0.0)
faraday (~> 0.9)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 0.9)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.21.2, < 0.24.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
mini_magick (~> 4.5.1)
multi_json
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.2.2, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.8.1, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-api-client (0.23.9)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.3.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.0.5)
faraday (~> 0.11)
google-cloud-storage (1.16.0)
digest-crc (~> 0.4)
google-api-client (~> 0.23)
google-cloud-core (~> 1.2)
googleauth (>= 0.6.2, < 0.10.0)
googleauth (0.6.7)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
json (2.2.0)
jwt (2.1.0)
memoist (0.16.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mini_magick (4.5.1)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
naturally (2.2.0)
os (1.0.0)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
rubyzip (1.2.2)
security (0.1.3)
signet (0.11.0)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.5)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.6.1)
tty-screen (0.6.5)
tty-spinner (0.9.0)
tty-cursor (~> 0.6.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.5.0)
word_wrap (1.0.0)
xcodeproj (1.8.2)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
ruby

DEPENDENCIES
fastlane

BUNDLED WITH
1.16.1
31 changes: 13 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ def getRevision = { ->
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
testBuildType 'debugTest'
testBuildType "mockdata"

defaultConfig {
versionCode 224
versionName "4.16"
minSdkVersion 17
minSdkVersion 18
targetSdkVersion 28
multiDexEnabled true
applicationId "com.irccloud.android"
testApplicationId "com.irccloud.android.test"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

resConfigs "en"
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -265,8 +265,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}

mockdata.initWith(debug)
mockdata
mockdata {
initWith debug

applicationIdSuffix ".mockdata"
versionNameSuffix "-" + getRevision()
buildConfigField "String", "HOST", "\"\""
Expand All @@ -293,12 +295,6 @@ android {
shrinkResources false
debuggable true
}

debugTest.initWith(debug)
debugTest {
minifyEnabled false
shrinkResources false
}
}

sourceSets {
Expand All @@ -307,18 +303,13 @@ android {
main.resources.srcDirs = ['src']
main.aidl.srcDirs = ['src']
main.renderscript.srcDirs = ['src']
enterprisedebug.res.srcDirs = ['enterprise-res', 'themes']
enterpriserelease.res.srcDirs = ['enterprise-res', 'themes']
main.res.srcDirs = ['res', 'themes']
main.assets.srcDirs = ['assets']
debug.java.srcDirs = ['release-src']
enterprisedebug.java.srcDirs = ['debug-src']
release.java.srcDirs = ['release-src']
enterpriserelease.java.srcDirs = ['release-src']
debugTest.java.srcDirs = ['release-src']
enterprisedebug.res.srcDirs = ['enterprise-res', 'themes']
enterpriserelease.res.srcDirs = ['enterprise-res', 'themes']
mockdata.manifest.srcFile 'AndroidManifestMock.xml'

androidTest {
manifest.srcFile 'tests/AndroidManifest.xml'
java.srcDirs = ['tests/src']
res.srcDirs = ['tests/res']
assets.srcDirs = ['tests/assets']
Expand Down Expand Up @@ -393,4 +384,8 @@ dependencies {
transitive = true
}
implementation fileTree(include: ['*.jar'], dir: 'libs')

androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'tools.fastlane:screengrab:1.2.0'
}
Loading

0 comments on commit 0e50274

Please sign in to comment.