Skip to content
Snippets Groups Projects
Commit cbd7ebc0 authored by John Carlson's avatar John Carlson
Browse files

Merge branch 'develop'

parents 35eba923 e31b881c
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 212 additions and 220 deletions
#Derived from https://about.gitlab.com/2016/11/30/setting-up-gitlab-ci-for-android-projects/
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "25"
ANDROID_BUILD_TOOLS: "25.0.3"
ANDROID_SDK_TOOLS: "25.2.3"
image: commit451/android-sdk-installer:latest
 
before_script:
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/tools_r${ANDROID_SDK_TOOLS}-linux.zip
- unzip -q android-sdk.zip -d android-sdk
- export ANDROID_HOME=$PWD/android-sdk
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-$ANDROID_COMPILE_SDK"
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;$ANDROID_BUILD_TOOLS"
- android-sdk-installer
 
stages:
- build
- test
- deploy
 
build:
stage: build
Loading
Loading
@@ -25,4 +16,26 @@ build:
test:
stage: test
script:
- ./gradlew testFdroidDebug
\ No newline at end of file
- ./gradlew testFdroidDebug
artifacts:
when: always
paths:
- app/build/reports/tests/testFdroidDebugUnitTest
expire_in: 15 days
pages:
stage: deploy
dependencies:
- test
allow_failure: true
before_script:
- echo "Overide global before_script and don't do anything."
script:
- mkdir -p public/tests
- cp -r app/build/reports/tests/testFdroidDebugUnitTest/ public/tests
artifacts:
paths:
- public
when: always
only:
- develop
language: android
language: java
env:
- ANDROID_HOME=$PWD/android-sdk
# Skip the install step, gradlew assemble will fail due to Crashlytics
install: true
 
jdk:
- oraclejdk8
 
android:
components:
- platform-tools
- tools
- build-tools-25.0.3
- android-25
- extra-android-m2repository
- extra-google-m2repository
before_install:
- rvm install 2.3.4
- gem install android-sdk-installer
- android-sdk-installer -i
 
script: "./gradlew testFdroidDebug"
Change Log
==========
 
Version 2.4.7
----------------------------
- Upgrade to v4 of the API. This requires you to update your GitLab instances to 9.0 if you have not already
- Use commonmark for Markdown rendering
- Fix issue where certain project tabs were not showing up
- Fix user images not loading properly
- Fix about page contributors not loading for non GitLab.com users
- Fix issue share button link
Version 2.4.6
----------------------------
 
Loading
Loading
# LabCoat for GitLab
 
[![build status](https://gitlab.com/Commit451/LabCoat/badges/master/build.svg)](https://gitlab.com/Commit451/LabCoat/commits/master) [![Join Us On Discord](https://img.shields.io/badge/Discord-LabCoat-blue.svg)](https://discord.gg/SDxsaKE)
[![build status](https://gitlab.com/Commit451/LabCoat/badges/master/build.svg)](https://gitlab.com/Commit451/LabCoat/commits/master) [![Discord](https://img.shields.io/discord/304078613114781696.svg)](https://discord.gg/SDxsaKE)
 
![Image](https://gitlab.com/Commit451/LabCoat/raw/master/art/screenshot-1.png)
![Image](art/screenshot-1.png)
 
[![Google Play](https://gitlab.com/Commit451/LabCoat/raw/master/art/google-play-badge.png)](https://play.google.com/store/apps/details?id=com.commit451.gitlab)
 
Loading
Loading
@@ -21,52 +21,6 @@ To build, run the following.
./gradlew assembleDebug
```
 
## Libraries
The following 3rd party libraries and resources are the reason this app works. Rapid development is easily attainable thanks to these fine folks and the work they do:
- AppCompat (https://developer.android.com/tools/support-library/features.html)
- Design (https://developer.android.com/tools/support-library/features.html)
- RecyclerView (https://developer.android.com/tools/support-library/features.html)
- CardView (https://developer.android.com/tools/support-library/features.html)
- Palette (https://developer.android.com/tools/support-library/features.html)
- Picasso (http://square.github.io/picasso/)
- Retrofit (http://square.github.io/retrofit/)
- OkHttp (http://square.github.io/okhttp/)
- Otto (http://square.github.io/otto/)
- RxJava (https://github.com/ReactiveX/RxJava)
- RxAndroid (https://github.com/ReactiveX/RxAndroid)
- Butter Knife (http://jakewharton.github.io/butterknife/)
- Timber (https://github.com/JakeWharton/timber)
- LoganSquare (https://github.com/bluelinelabs/LoganSquare)
- retrofit-logansquare (https://github.com/aurae/retrofit-logansquare)
- Joda Time Android (https://github.com/dlew/joda-time-android)
- Parceler (https://github.com/johncarl81/parceler)
- Bypasses (https://github.com/Commit451/bypasses)
- Easel (https://github.com/Commit451/Easel)
- ElasticDragDismissLayout (https://github.com/Commit451/ElasticDragDismissLayout)
- AdapterLayout (https://github.com/Commit451/AdapterLayout)
- Gimbal (https://github.com/Commit451/Gimbal)
- Teleprinter (https://github.com/Commit451/Teleprinter)
- BypassPicassoImageGetter (https://github.com/Commit451/BypassPicassoImageGetter)
- Jounce (https://github.com/Commit451/Jounce)
- EasyCallback (https://github.com/Commit451/EasyCallback)
- ForegroundViews (https://github.com/Commit451/ForegroundViews)
- Material-ish Progress (https://github.com/pnikosis/materialish-progress)
- PhysicsLayout (https://github.com/Jawnnypoo/PhysicsLayout)
- Material Letter Icon (https://github.com/IvBaranov/MaterialLetterIcon)
- RecyclerViewSquire (https://github.com/AlexKGwyn/RecyclerViewSquire)
- RobotoTextView (https://github.com/johnkil/Android-RobotoTextView)
- GitDiffTextView (https://github.com/alorma/GitDiffTextView)
- MaterialDateTimePicker (https://github.com/wdullaer/MaterialDateTimePicker)
- FlowLayout (https://github.com/blazsolar/FlowLayout)
- SimpleChromeCustomTabs (https://github.com/novoda/simple-chrome-custom-tabs)
- Material Dialogs (https://github.com/afollestad/material-dialogs)
- CircleImageView (https://github.com/hdodenhof/CircleImageView)
- EasyImage (https://github.com/jkwiecien/EasyImage)
- emoji-java (https://github.com/vdurmont/emoji-java)
- Crashlytics (https://www.crashlytics.com)
- highlight.js (https://highlightjs.org/)
## Contributing
Please fork this repository and contribute back! All Merge Requests should be made against the `develop` branch, as it is the active branch for development. Please make your best effort to break up commits as much as possible to improve the reviewing process.
 
Loading
Loading
debug: true
components:
- build-tools;26.0.1
- platforms;android-26
- extras;google;m2repository
Loading
Loading
@@ -4,7 +4,7 @@ buildscript {
}
 
dependencies {
classpath 'io.fabric.tools:gradle:1.22.1'
classpath 'io.fabric.tools:gradle:1.23.0'
}
}
 
Loading
Loading
@@ -18,25 +18,25 @@ apply plugin: 'io.fabric'
 
def versionMajor = 2
def versionMinor = 4
def versionPatch = 6
def versionPatch = 7
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
 
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion 26
buildToolsVersion "26.0.1"
 
project.ext {
LABCOAT_FABRIC_KEY = project.hasProperty("LABCOAT_FABRIC_KEY") ? project.LABCOAT_FABRIC_KEY : "";
KEYSTORE_PATH = project.hasProperty("KEYSTORE_PATH") ? project.KEYSTORE_PATH : " ";
KEYSTORE_PASSWORD = project.hasProperty("KEYSTORE_PASSWORD") ? project.KEYSTORE_PASSWORD : " ";
KEYSTORE_ALIAS = project.hasProperty("KEYSTORE_ALIAS") ? project.KEYSTORE_ALIAS : " ";
KEY_PASSWORD = project.hasProperty("KEY_PASSWORD") ? project.KEY_PASSWORD : " ";
LABCOAT_FABRIC_KEY = project.hasProperty("LABCOAT_FABRIC_KEY") ? project.LABCOAT_FABRIC_KEY : ""
KEYSTORE_PATH = project.hasProperty("KEYSTORE_PATH") ? project.KEYSTORE_PATH : " "
KEYSTORE_PASSWORD = project.hasProperty("KEYSTORE_PASSWORD") ? project.KEYSTORE_PASSWORD : " "
KEYSTORE_ALIAS = project.hasProperty("KEYSTORE_ALIAS") ? project.KEYSTORE_ALIAS : " "
KEY_PASSWORD = project.hasProperty("KEY_PASSWORD") ? project.KEY_PASSWORD : " "
}
 
defaultConfig {
applicationId "com.commit451.gitlab"
minSdkVersion 16
targetSdkVersion 25
targetSdkVersion 26
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
Loading
Loading
@@ -46,12 +46,16 @@ android {
multiDexEnabled true
}
 
flavorDimensions "type"
productFlavors {
 
normal {
dimension "type"
}
 
fdroid {
dimension "type"
}
}
 
Loading
Loading
@@ -76,6 +80,8 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.enableCrashlytics = false
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}
}
lintOptions {
Loading
Loading
@@ -87,136 +93,139 @@ android {
}
 
ext {
supportLibVersion = '25.3.1'
supportLibVersion = '26.0.0'
retrofitVersion = '2.3.0'
okHttpVersion = '3.8.0'
butterknifeVersion = '8.6.0'
loganSquareVersion = '1.3.7'
parcelerVersion = '1.1.8'
reptarVersion = '2.4.1'
adapterLayout = '1.1.0'
okHttpVersion = '3.8.1'
butterknifeVersion = '8.7.0'
parcelerVersion = '1.1.9'
reptarVersion = '2.5.0'
adapterLayout = '1.1.1'
materialDialogsVersion = '0.9.4.5'
leakCanaryVersion = '1.5'
addendumVersion = '1.3.1'
alakazamVersion = '1.0.1'
moshiVersion = '1.5.0'
}
 
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
 
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlinVersion"
 
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:support-v13:$supportLibVersion"
compile "com.android.support:design:$supportLibVersion"
compile "com.android.support:recyclerview-v7:$supportLibVersion"
compile "com.android.support:cardview-v7:$supportLibVersion"
compile "com.android.support:palette-v7:$supportLibVersion"
compile "com.android.support:customtabs:$supportLibVersion"
compile 'com.android.support:multidex:1.0.1'
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:support-v13:$supportLibVersion"
implementation "com.android.support:design:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
implementation "com.android.support:cardview-v7:$supportLibVersion"
implementation "com.android.support:palette-v7:$supportLibVersion"
implementation "com.android.support:customtabs:$supportLibVersion"
implementation 'com.android.support:multidex:1.0.2'
 
compile 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
 
compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
compile("com.squareup.retrofit2:converter-simplexml:$retrofitVersion") {
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation("com.squareup.retrofit2:converter-simplexml:$retrofitVersion") {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
compile "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
compile "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
compile "com.squareup.okhttp3:okhttp:$okHttpVersion"
compile "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.aurae.retrofit2:converter-logansquare:1.4.1'
compile "com.bluelinelabs:logansquare:$loganSquareVersion"
kapt "com.bluelinelabs:logansquare-compiler:$loganSquareVersion"
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
compile "com.jakewharton:butterknife:$butterknifeVersion"
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation "com.squareup.moshi:moshi:$moshiVersion"
implementation "com.squareup.moshi:moshi-adapters:$moshiVersion"
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
implementation "com.jakewharton:butterknife:$butterknifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
 
compile 'io.reactivex.rxjava2:rxjava:2.1.0'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'org.greenrobot:eventbus:3.0.0'
 
compile 'com.trello.rxlifecycle2:rxlifecycle-components:2.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.1.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
 
compile 'net.danlew:android.joda:2.9.9'
implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.1.0'
 
compile "org.parceler:parceler-api:$parcelerVersion"
implementation "org.parceler:parceler-api:$parcelerVersion"
kapt "org.parceler:parceler:$parcelerVersion"
 
compile "com.github.Commit451.Reptar:reptar:$reptarVersion"
compile "com.github.Commit451.Reptar:reptar-retrofit:$reptarVersion"
compile "com.github.Commit451.Reptar:reptar-kotlin:$reptarVersion"
compile 'com.github.Commit451:bypasses:1.1.0'
compile 'com.github.Commit451:ElasticDragDismissLayout:1.0.4'
compile "com.github.Commit451.AdapterLayout:adapterlayout:$adapterLayout"
compile ("com.github.Commit451.AdapterLayout:adapterflowlayout:$adapterLayout") {
implementation "com.github.Commit451.Reptar:reptar:$reptarVersion"
implementation "com.github.Commit451.Reptar:reptar-retrofit:$reptarVersion"
implementation "com.github.Commit451.Reptar:reptar-kotlin:$reptarVersion"
implementation 'com.github.Commit451:ElasticDragDismissLayout:1.0.4'
implementation "com.github.Commit451.AdapterLayout:adapterlayout:$adapterLayout"
implementation("com.github.Commit451.AdapterLayout:adapterflowlayout:$adapterLayout") {
exclude group: 'com.wefika', module: 'flowlayout'
}
//https://github.com/blazsolar/FlowLayout/issues/31
compile ("com.wefika:flowlayout:0.4.1") {
implementation("com.wefika:flowlayout:0.4.1") {
exclude group: 'com.intellij', module: 'annotations'
}
compile 'com.github.Commit451.Easel:easel:2.1.1'
compile 'com.github.Commit451:Gimbal:2.0.2'
compile 'com.github.Commit451:Teleprinter:1.0.2'
compile 'com.github.Commit451:BypassPicassoImageGetter:1.1.1'
compile 'com.github.Commit451:Jounce:1.0.2'
compile 'com.github.Commit451:ForegroundViews:2.3.1'
compile 'com.github.Commit451:MorphTransitions:2.0.0'
compile 'com.github.Commit451.Alakazam:alakazam:1.0.1'
compile 'com.github.Commit451:Lift:1.2.0'
compile 'com.github.Commit451:okyo:2.0.0'
compile 'com.github.Commit451:OkioProGuardRules:1.11.0.0'
compile 'com.github.Commit451:RetrofitProguardRules:2.2.0.0'
compile 'com.github.Commit451:LoganSquareProGuardRules:1.3.7.0'
compile 'com.github.Commit451:EventBusProGuardRules:3.0.0.0'
compile 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'com.github.Commit451.Easel:easel:2.1.1'
implementation 'com.github.Commit451:Gimbal:2.0.2'
implementation 'com.github.Commit451:Teleprinter:1.0.2'
implementation 'com.github.Commit451:Jounce:1.0.2'
implementation 'com.github.Commit451:ForegroundViews:2.4.0'
implementation 'com.github.Commit451:MorphTransitions:2.0.0'
implementation "com.github.Commit451.Alakazam:alakazam:$alakazamVersion"
implementation "com.github.Commit451.Alakazam:alakazam-kotlin:$alakazamVersion"
implementation 'com.github.Commit451:Lift:1.2.0'
implementation 'com.github.Commit451:okyo:2.0.0'
implementation 'com.github.Commit451:OkioProGuardRules:1.11.0.0'
implementation 'com.github.Commit451:RetrofitProguardRules:2.2.0.0'
implementation 'com.github.Commit451:LoganSquareProGuardRules:1.3.7.0'
implementation 'com.github.Commit451:EventBusProGuardRules:3.0.0.0'
implementation "com.github.Commit451.Addendum:addendum:$addendumVersion"
implementation "com.github.Commit451.Addendum:addendum-parceler:$addendumVersion"
 
compile 'me.zhanghai.android.materialprogressbar:library:1.4.1'
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
 
compile 'com.github.Jawnnypoo:PhysicsLayout:2.1.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.4.1'
 
compile 'com.alexgwyn.recyclerviewsquire:recyclerviewsquire:0.0.6'
implementation 'com.github.Jawnnypoo:PhysicsLayout:2.1.0'
 
compile 'com.github.ivbaranov:materiallettericon:0.2.2'
implementation 'com.alexgwyn.recyclerviewsquire:recyclerviewsquire:0.0.6'
 
compile 'com.github.johnkil.android-robototextview:robototextview:3.0.0'
implementation 'com.github.ivbaranov:materiallettericon:0.2.2'
 
compile 'com.github.alorma:diff-textview:1.3.0'
implementation 'com.github.alorma:diff-textview:1.3.0'
 
compile 'com.wdullaer:materialdatetimepicker:3.2.2'
implementation 'com.wdullaer:materialdatetimepicker:3.2.2'
 
compile 'com.github.novoda:simple-chrome-custom-tabs:0.1.5'
implementation 'com.github.novoda:simple-chrome-custom-tabs:0.1.5'
 
compile "com.afollestad.material-dialogs:core:$materialDialogsVersion"
compile "com.afollestad.material-dialogs:commons:$materialDialogsVersion"
implementation "com.afollestad.material-dialogs:core:$materialDialogsVersion"
implementation "com.afollestad.material-dialogs:commons:$materialDialogsVersion"
 
compile 'de.hdodenhof:circleimageview:2.1.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
 
compile('com.vdurmont:emoji-java:3.2.0') {
implementation('com.vdurmont:emoji-java:3.2.0') {
exclude group: 'org.json', module: 'json'
}
 
compile 'com.github.jkwiecien:EasyImage:1.4.1'
implementation 'com.github.jkwiecien:EasyImage:2.0.2'
 
compile('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true;
}
implementation 'com.atlassian.commonmark:commonmark:0.9.0'
 
normalCompile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
normalImplementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}
 
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
testCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
testImplementation 'junit:junit:4.12'
testImplementation('org.threeten:threetenbp:1.3.6') {
exclude group: 'com.jakewharton.threetenabp', module: 'threetenabp'
}
 
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.3.2'
androidTestImplementation ('com.android.support.test:runner:1.0.0') {
exclude group:'com.android.support', module:'support-annotations'
}
}
Loading
Loading
@@ -38,18 +38,18 @@
-dontwarn javax.xml.stream.events.**
-dontwarn javax.xml.**
 
## joda-time-android 2.8.0
# This is only necessary if you are not including the optional joda-convert dependency
-dontwarn org.joda.convert.FromString
-dontwarn org.joda.convert.ToString
# Parcel library
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
# Parceler library
-keep interface org.parceler.Parcel
-keep @org.parceler.Parcel class * { *; }
-keep class **$$Parcelable { *; }
# Moshi
-dontwarn okio.**
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault
-keepclasseswithmembers class * {
@com.squareup.moshi.* <methods>;
}
 
-keep class org.parceler.Parceler$$Parcels
# Custom rules
-keep class com.commit451.gitlab.ssl.CustomSSLSocketFactory
\ No newline at end of file
package com.commit451.gitlab
 
import android.net.Uri
import com.commit451.gitlab.navigation.RoutingNavigator
 
/**
Loading
Loading
package com.commit451.gitlab
 
import android.net.Uri
import android.support.test.runner.AndroidJUnit4
import com.commit451.gitlab.navigation.RoutingRouter
import junit.framework.Assert
import org.junit.BeforeClass
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
import org.robolectric.shadows.ShadowLog
 
/**
* Tests account login and basic retrieval stuff
*/
@RunWith(RobolectricTestRunner::class)
@Config(constants = BuildConfig::class, sdk = intArrayOf(21))
@RunWith(AndroidJUnit4::class)
class RoutingTests {
 
companion object {
@BeforeClass
@Throws(Exception::class)
fun setUp() {
//for logging
ShadowLog.stream = System.out
}
}
@Test
fun routeIssues() {
val countingRouter = CountingRouter()
Loading
Loading
app/src/debug/res/mipmap-hdpi/ic_launcher.png

2.08 KiB

app/src/debug/res/mipmap-mdpi/ic_launcher.png

1.38 KiB

app/src/debug/res/mipmap-xhdpi/ic_launcher.png

2.93 KiB

app/src/debug/res/mipmap-xxhdpi/ic_launcher.png

4.96 KiB

app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png

7.1 KiB

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">LabCoat Debug</string>
<string name="leak_canary_display_activity_label">LabCoat Leaks</string>
</resources>
\ No newline at end of file
Loading
Loading
@@ -100,12 +100,8 @@
</intent-filter>
</activity>
<activity android:name=".widget.ProjectFeedWidgetConfigureProjectActivity"/>
<activity
android:name=".activity.FullscreenImageActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_fullscreen_image"
android:theme="@style/FullscreenTheme">
</activity>
<activity android:name=".activity.FullscreenImageActivity"/>
 
<activity android:name=".activity.DebugActivity"/>
 
Loading
Loading
Loading
Loading
@@ -5,16 +5,19 @@ import android.content.Context
import android.content.res.Resources
import android.support.annotation.VisibleForTesting
import android.support.multidex.MultiDex
import com.commit451.gitlab.api.*
import com.commit451.gitlab.api.GitLab
import com.commit451.gitlab.api.GitLabFactory
import com.commit451.gitlab.api.OkHttpClientFactory
import com.commit451.gitlab.api.PicassoFactory
import com.commit451.gitlab.data.Prefs
import com.commit451.gitlab.model.Account
import com.commit451.gitlab.util.FabricUtil
import com.commit451.lift.Lift
import com.jakewharton.threetenabp.AndroidThreeTen
import com.novoda.simplechromecustomtabs.SimpleChromeCustomTabs
import com.squareup.leakcanary.LeakCanary
import com.squareup.picasso.Picasso
import io.reactivex.plugins.RxJavaPlugins
import net.danlew.android.joda.JodaTimeAndroid
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import org.greenrobot.eventbus.EventBus
Loading
Loading
@@ -58,7 +61,7 @@ open class App : Application() {
Timber.e(error)
}
 
GitLab.init()
setupThreeTen()
 
Prefs.init(this)
//So that we don't get weird half translations
Loading
Loading
@@ -69,7 +72,6 @@ open class App : Application() {
Timber.plant(Timber.DebugTree())
}
 
JodaTimeAndroid.init(this)
SimpleChromeCustomTabs.initialize(this)
 
val accounts = Account.getAccounts()
Loading
Loading
@@ -95,7 +97,7 @@ open class App : Application() {
clientBuilder.addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
}
val client = clientBuilder.build()
initGitLab(account, client)
initGitLab(account, clientBuilder)
if (BuildConfig.DEBUG) {
initPicasso(OkHttpClientFactory.create(account).build())
} else {
Loading
Loading
@@ -122,6 +124,11 @@ open class App : Application() {
LeakCanary.install(this)
}
 
@VisibleForTesting
protected open fun setupThreeTen() {
AndroidThreeTen.init(this)
}
private fun forceLocale(locale: Locale) {
try {
Locale.setDefault(locale)
Loading
Loading
@@ -138,10 +145,8 @@ open class App : Application() {
 
}
 
private fun initGitLab(account: Account, client: OkHttpClient) {
val gitLabService = GitLabFactory.create(account, client)
val gitLabRss = GitLabRssFactory.create(account, client)
gitLab = GitLab(gitLabService, gitLabRss)
private fun initGitLab(account: Account, clientBuilder: OkHttpClient.Builder) {
gitLab = GitLabFactory.createGitLab(account, clientBuilder)
}
 
private fun initPicasso(client: OkHttpClient) {
Loading
Loading
Loading
Loading
@@ -20,7 +20,9 @@ import com.commit451.gimbal.Gimbal
import com.commit451.gitlab.App
import com.commit451.gitlab.BuildConfig
import com.commit451.gitlab.R
import com.commit451.gitlab.api.GitLab
import com.commit451.gitlab.extension.setup
import com.commit451.gitlab.model.Account
import com.commit451.gitlab.model.api.Contributor
import com.commit451.gitlab.navigation.Navigator
import com.commit451.gitlab.rx.CustomSingleObserver
Loading
Loading
@@ -93,7 +95,15 @@ class AboutActivity : BaseActivity() {
physicsLayout.physics.enableFling()
sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager
gravitySensor = sensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY)
App.get().gitLab.getContributors(REPO_ID)
var gitLab = App.get().gitLab
val gitLabUrl = getString(R.string.url_gitlab)
if (!gitLab.account.serverUrl.toString().contains(gitLabUrl)) {
val account = Account()
account.serverUrl = gitLabUrl
gitLab = GitLab.Builder(account)
.build()
}
gitLab.getContributors(REPO_ID)
.setup(bindToLifecycle())
.subscribe(object : CustomSingleObserver<List<Contributor>>() {
 
Loading
Loading
Loading
Loading
@@ -2,6 +2,7 @@ package com.commit451.gitlab.activity
 
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.support.v4.view.GravityCompat
import android.support.v4.widget.DrawerLayout
Loading
Loading
@@ -48,7 +49,7 @@ class ActivityActivity : BaseActivity() {
 
var feedFragment: FeedFragment? = supportFragmentManager.findFragmentByTag(TAG_FEED_FRAGMENT) as? FeedFragment
if (feedFragment == null) {
var feedUri = App.get().getAccount().serverUrl
var feedUri = Uri.parse(App.get().getAccount().serverUrl)
 
feedUri = feedUri.buildUpon()
.appendPath("dashboard")
Loading
Loading
Loading
Loading
@@ -18,6 +18,8 @@ import butterknife.BindView
import butterknife.ButterKnife
import butterknife.OnClick
import com.commit451.adapterflowlayout.AdapterFlowLayout
import com.commit451.addendum.parceler.getParcelerParcelableExtra
import com.commit451.addendum.parceler.putParcelerParcelableExtra
import com.commit451.gitlab.App
import com.commit451.gitlab.R
import com.commit451.gitlab.adapter.AddIssueLabelAdapter
Loading
Loading
@@ -26,8 +28,6 @@ import com.commit451.gitlab.adapter.MilestoneSpinnerAdapter
import com.commit451.gitlab.event.IssueChangedEvent
import com.commit451.gitlab.event.IssueCreatedEvent
import com.commit451.gitlab.extension.checkValid
import com.commit451.gitlab.extension.getParcelerParcelable
import com.commit451.gitlab.extension.putParcelParcelableExtra
import com.commit451.gitlab.extension.setup
import com.commit451.gitlab.model.api.*
import com.commit451.gitlab.navigation.Navigator
Loading
Loading
@@ -54,9 +54,9 @@ class AddIssueActivity : MorphActivity() {
 
fun newIntent(context: Context, project: Project, issue: Issue?): Intent {
val intent = Intent(context, AddIssueActivity::class.java)
intent.putParcelParcelableExtra(KEY_PROJECT, project)
intent.putParcelerParcelableExtra(KEY_PROJECT, project)
if (issue != null) {
intent.putParcelParcelableExtra(KEY_ISSUE, issue)
intent.putParcelerParcelableExtra(KEY_ISSUE, issue)
}
return intent
}
Loading
Loading
@@ -96,8 +96,8 @@ class AddIssueActivity : MorphActivity() {
morph(root)
teleprinter = Teleprinter(this)
 
project = intent.getParcelerParcelable<Project>(KEY_PROJECT)!!
issue = intent.getParcelerParcelable<Issue>(KEY_ISSUE)
project = intent.getParcelerParcelableExtra<Project>(KEY_PROJECT)!!
issue = intent.getParcelerParcelableExtra<Issue>(KEY_ISSUE)
members = HashSet<Member>()
adapterLabels = AddIssueLabelAdapter(object : AddIssueLabelAdapter.Listener {
override fun onLabelClicked(label: Label) {
Loading
Loading
@@ -257,7 +257,7 @@ class AddIssueActivity : MorphActivity() {
when (requestCode) {
REQUEST_LABEL ->
if (resultCode == Activity.RESULT_OK) {
val label = data?.getParcelerParcelable<Label>(AddLabelActivity.KEY_LABEL)!!
val label = data?.getParcelerParcelableExtra<Label>(AddLabelActivity.KEY_LABEL)!!
if (adapterLabels.containsLabel(label)) {
Snackbar.make(root, R.string.label_already_added, Snackbar.LENGTH_SHORT)
.show()
Loading
Loading
@@ -327,7 +327,7 @@ class AddIssueActivity : MorphActivity() {
isConfidential))
} else {
observeUpdate(App.get().gitLab.updateIssue(project.id,
issue!!.id,
issue!!.iid,
title,
description,
assigneeId,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment