Commit e4999e3d authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Merge branch 'develop'

parents a19b00ec 90663b1e
......@@ -8,8 +8,7 @@ local.properties
# Idea
.idea/
!.idea/codeStyles
**/*.iml
# Mac OS
.DS_Store
\ No newline at end of file
.DS_Store
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true" />
</AndroidXmlCodeStyleSettings>
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
<XML>
<option name="XML_KEEP_LINE_BREAKS" value="false" />
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</XML>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
\ No newline at end of file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
apply from: '../ci.gradle'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.gitlab.terrakok.gitfox"
minSdkVersion 19
targetSdkVersion 28
versionName "1.3.2"
versionCode 11
buildConfigField "String", "VERSION_UID", '"' + getBuildUid() + '"'
buildConfigField "String", "APP_DESCRIPTION", '"Gitfox is an Android client for Gitlab."'
buildConfigField "String", "FEEDBACK_URL", '"https://gitlab.com/terrakok/gitlab-client/issues"'
buildConfigField "String", "APP_HOME_PAGE", '"https://gitlab.com/terrakok/gitlab-client"'
buildConfigField "String", "WEB_AUTH_USER_AGENT", '"gitfox_user_agent"'
buildConfigField "String", "ORIGIN_GITLAB_ENDPOINT", '"https://gitlab.com/"'
//todo: put prod value for release
buildConfigField "String", "OAUTH_APP_ID", '"808b7f51c6634294afd879edd75d5eaf55f1a75e7fe5bd91ca8b7140a5af639d"'
buildConfigField "String", "OAUTH_SECRET", '"a9dd39c8d2e781b65814007ca0f8b555d34f79b4d30c9356c38bb7ad9909c6f3"'
buildConfigField "String", "OAUTH_CALLBACK", '"app://gitlab.client/"'
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [toothpick_registry_package_name: 'ru.terrakok.gitlabclient']
}
}
}
signingConfigs {
//todo put key params for release
prod {
storeFile file("../keys/play/key.jks")
storePassword "pass"
keyAlias "alias"
keyPassword "pass"
}
}
buildTypes {
debugPG {
initWith debug
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix ' debugPG'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.prod
}
}
}
ext {
supportLibraryVersion = "28.0.0"
moxyVersion = "1.4.6"
toothpickVersion = "1.0.6"
retrofitVersion = "2.2.0"
markwonVersion = "1.1.1"
glideVersion = "4.8.0"
}
dependencies {
//Support
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
implementation "com.android.support:design:$supportLibraryVersion"
implementation "com.android.support.constraint:constraint-layout:1.1.3"
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
//Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
//Log
implementation "com.jakewharton.timber:timber:4.7.0"
//MVP Moxy
kapt "com.arello-mobile:moxy-compiler:$moxyVersion"
implementation "com.arello-mobile:moxy-app-compat:$moxyVersion"
//Cicerone Navigation
implementation "ru.terrakok.cicerone:cicerone:4.0.2"
//DI
implementation "com.github.stephanenicolas.toothpick:toothpick-runtime:$toothpickVersion"
kapt "com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion"
//Gson
implementation "com.google.code.gson:gson:2.8.2"
//Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.okhttp3:logging-interceptor:3.11.0"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
//RxJava
implementation "io.reactivex.rxjava2:rxandroid:2.1.0"
implementation "io.reactivex.rxjava2:rxjava:2.2.2"
implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
//Adapter simplify
implementation "com.hannesdorfmann:adapterdelegates3:3.0.1"
//Image load and cache
implementation "com.github.bumptech.glide:glide:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation ('com.github.bumptech.glide:okhttp3-integration:4.6.1') {
exclude group: 'glide-parent'
}
//Markdown to HTML converter
implementation "ru.noties:markwon:$markwonVersion"
implementation "ru.noties:markwon-image-loader:$markwonVersion"
//Bottom navigation bar
implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
//Lottie
implementation 'com.airbnb.android:lottie:2.5.1'
//Date
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
//FlexBox Layout
implementation 'com.google.android:flexbox:1.0.0'
//Firebase
implementation 'com.google.firebase:firebase-core:16.0.4'
//Crashlytics
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
//JUnit
testImplementation "junit:junit:4.12"
//Mockito
testImplementation "org.mockito:mockito-core:2.8.9"
//Mockito Kotlin
testImplementation "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
}
configurations.all {
resolutionStrategy {
force "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
}
}
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
plugins {
id("com.android.application")
id("io.fabric")
id("org.jetbrains.kotlin.android.extensions")
kotlin("android")
kotlin("kapt")
}
val buildUid = System.getenv("BUILD_COMMIT_SHA") ?: "local"
android {
compileSdkVersion(28)
defaultConfig {
applicationId = "com.gitlab.terrakok.gitfox"
minSdkVersion(19)
targetSdkVersion(28)
versionName = "1.4.0"
versionCode = 12
buildToolsVersion = "28.0.3"
defaultConfig {
buildConfigField("String", "VERSION_UID", "\"$buildUid\"")
buildConfigField("String", "APP_DESCRIPTION", "\"Gitfox is an Android client for Gitlab.\"")
buildConfigField("String", "FEEDBACK_URL", "\"https://gitlab.com/terrakok/gitlab-client/issues\"")
buildConfigField("String", "APP_HOME_PAGE", "\"https://gitlab.com/terrakok/gitlab-client\"")
buildConfigField("String", "WEB_AUTH_USER_AGENT", "\"gitfox_user_agent\"")
buildConfigField("String", "ORIGIN_GITLAB_ENDPOINT", "\"https://gitlab.com/\"")
buildConfigField(
"String",
"APP_DEVELOPERS_PATH",
"\"https://gitlab.com/terrakok/gitlab-client/graphs/develop\""
)
//todo: put prod value for release
buildConfigField(
"String",
"OAUTH_APP_ID",
"\"808b7f51c6634294afd879edd75d5eaf55f1a75e7fe5bd91ca8b7140a5af639d\""
)
buildConfigField(
"String",
"OAUTH_SECRET",
"\"a9dd39c8d2e781b65814007ca0f8b555d34f79b4d30c9356c38bb7ad9909c6f3\""
)
buildConfigField("String", "OAUTH_CALLBACK", "\"app://gitlab.client/\"")
multiDexEnabled = true
javaCompileOptions {
annotationProcessorOptions {
arguments = mapOf(
"toothpick_registry_package_name" to "ru.terrakok.gitlabclient"
)
}
}
}
signingConfigs {
create("prod") {
//todo put key params for release
storeFile = file("../keys/play/key.jks")
storePassword = "pass"
keyAlias = "alias"
keyPassword = "pass"
}
}
buildTypes {
create("debugPG") {
initWith(getByName("debug"))
isMinifyEnabled = true
versionNameSuffix = " debugPG"
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
file("proguard-rules.pro")
)
}
getByName("release") {
isMinifyEnabled = true
signingConfig = signingConfigs.getByName("prod")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
file("proguard-rules.pro")
)
}
}
}
}
dependencies {
val supportLibraryVersion = "28.0.0"
val moxyVersion = "1.4.6"
val toothpickVersion = "1.0.6"
val retrofitVersion = "2.2.0"
val markwonVersion = "2.0.0"
val glideVersion = "4.8.0"
//Support
implementation("com.android.support:appcompat-v7:$supportLibraryVersion")
implementation("com.android.support:design:$supportLibraryVersion")
implementation("com.android.support:cardview-v7:$supportLibraryVersion")
implementation("com.android.support.constraint:constraint-layout:1.1.3")
//Kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib:${extra["kotlinVersion"] as String}")
//Log
implementation("com.jakewharton.timber:timber:4.7.0")
//MVP Moxy
kapt("com.arello-mobile:moxy-compiler:$moxyVersion")
implementation("com.arello-mobile:moxy-app-compat:$moxyVersion")
//Cicerone Navigation
implementation("ru.terrakok.cicerone:cicerone:4.0.2")
//DI
implementation("com.github.stephanenicolas.toothpick:toothpick-runtime:$toothpickVersion")
kapt("com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion")
//Gson
implementation("com.google.code.gson:gson:2.8.2")
//Retrofit
implementation("com.squareup.retrofit2:retrofit:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion")
implementation("com.squareup.okhttp3:logging-interceptor:3.11.0")
implementation("com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion")
//RxJava
implementation("io.reactivex.rxjava2:rxandroid:2.1.0")
implementation("io.reactivex.rxjava2:rxjava:2.2.3")
implementation("com.jakewharton.rxrelay2:rxrelay:2.1.0")
//Adapter simplify
implementation("com.hannesdorfmann:adapterdelegates3:3.1.0")
//Image load and cache
implementation("com.github.bumptech.glide:glide:$glideVersion")
kapt("com.github.bumptech.glide:compiler:$glideVersion")
implementation("com.github.bumptech.glide:okhttp3-integration:4.6.1") {
exclude(group = "glide-parent")
}
//Markdown to HTML converter
implementation("ru.noties:markwon:$markwonVersion")
implementation("ru.noties:markwon-image-loader:$markwonVersion")
//Bottom navigation bar
implementation("com.aurelhubert:ahbottomnavigation:2.1.0")
//Lottie
implementation("com.airbnb.android:lottie:2.5.1")
//Date
implementation("com.jakewharton.threetenabp:threetenabp:1.0.5")
//FlexBox Layout
implementation("com.google.android:flexbox:1.0.0")
//Firebase
implementation("com.google.firebase:firebase-core:16.0.6")
//Crashlytics
implementation("com.crashlytics.sdk.android:crashlytics:2.9.8")
//JUnit
testImplementation("junit:junit:4.12")
//Mockito
testImplementation("org.mockito:mockito-core:2.8.9")
//Mockito Kotlin
testImplementation("com.nhaarman:mockito-kotlin-kt1.1:1.5.0")
}
configurations.all {
resolutionStrategy {
force("org.jetbrains.kotlin:kotlin-stdlib:${extra["kotlinVersion"] as String}")
}
}
gradle.buildFinished {
println("VersionName: ${android.defaultConfig.versionName}")
println("VersionCode: ${android.defaultConfig.versionCode}")
println("BuildUid: $buildUid")
}
apply(plugin = "com.google.gms.google-services")
\ No newline at end of file
{
"project_info": {
"project_number": "0",
"firebase_url": "debug",
"project_id": "gitfox-gitlab-client",
"storage_bucket": "debug"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:0:android:0",
"android_client_info": {
"package_name": "com.gitlab.terrakok.gitfox"
}
},
"oauth_client": [
{
"client_id": "debug",
"client_type": 3
}
],
"api_key": [
{
"current_key": "debug"
},
{
"current_key": "debug"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
......@@ -16,6 +16,7 @@
<activity
android:name=".ui.AppActivity"
android:launchMode="singleInstance"
android:theme="@style/AppTheme.Splash"
android:windowSoftInputMode="adjustResize">
<intent-filter>
......
[
{
"name": "Konstantin Tskhovrebov",
"avatarUrl": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/62974/avatar.png",
"gitlabId": 62974,
"role": "main developer"
},
{
"name": "Eugene Shapovalov",
"avatarUrl": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/1583723/avatar.png",
"gitlabId": 1583723,
"role": "main developer"
},
{
"name": "Ilyas Gaifullin",
"avatarUrl": "https://mir-s3-cdn-cf.behance.net/user/230/e0e22a1584077.581bca76bcad5.jpeg",
"role": "designer"
},
{
"name": "Vladimir Parfenov",
"avatarUrl": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/1523697/avatar.png",
"gitlabId": 1523697,
"role": "developer"
},
{
"name": "Artur Badretdinov",
"avatarUrl": "https://secure.gravatar.com/avatar/b438c8b238c833812f6eadebce50063f?s=180&d=identicon",
"gitlabId": 559497,
"role": "developer"
},
{
"name": "Ilya Gulya",
"avatarUrl": "https://secure.gravatar.com/avatar/1d1e894eef93d49b58aa3b39230d94dc?s=180&d=identicon",
"gitlabId": 1446627,
"role": "developer"
},
{
"name": "Vitalii Dmitriev",
"avatarUrl": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/1396844/avatar.png",
"gitlabId": 1396844,
"role": "developer"
},
{
"name": "Eugene Tereshkov",
"avatarUrl": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/1601949/avatar.png",
"gitlabId": 1601949,
"role": "developer"
}
]
\ No newline at end of file
......@@ -7,10 +7,8 @@ import com.jakewharton.threetenabp.AndroidThreeTen
import io.fabric.sdk.android.Fabric
import ru.noties.markwon.SpannableConfiguration
import ru.noties.markwon.spans.SpannableTheme
import ru.terrakok.gitlabclient.model.data.auth.AuthHolder
import ru.terrakok.gitlabclient.toothpick.DI
import ru.terrakok.gitlabclient.toothpick.module.AppModule
import ru.terrakok.gitlabclient.toothpick.module.ServerModule
import timber.log.Timber
import toothpick.Toothpick
import toothpick.configuration.Configuration
......@@ -62,13 +60,8 @@ class App : Application() {
}
private fun initAppScope() {
val appScope = Toothpick.openScope(DI.APP_SCOPE)
appScope.installModules(AppModule(this))
//By default we need init ServerScope for launch app
val authHolder = appScope.getInstance(AuthHolder::class.java)
val serverScope = Toothpick.openScopes(DI.APP_SCOPE, DI.SERVER_SCOPE)
serverScope.installModules(ServerModule(authHolder.serverPath))
Toothpick.openScope(DI.APP_SCOPE)
.installModules(AppModule(this))
}
private fun initMarkwon() {
......
......@@ -6,10 +6,12 @@ import android.net.Uri
import ru.terrakok.cicerone.android.support.SupportAppScreen
import ru.terrakok.gitlabclient.entity.issue.IssueState
import ru.terrakok.gitlabclient.entity.mergerequest.MergeRequestState
import ru.terrakok.gitlabclient.entity.milestone.MilestoneState
import ru.terrakok.gitlabclient.ui.about.AboutFragment
import ru.terrakok.gitlabclient.ui.auth.AuthFlowFragment
import ru.terrakok.gitlabclient.ui.auth.AuthFragment
import ru.terrakok.gitlabclient.ui.drawer.DrawerFlowFragment
import ru.terrakok.gitlabclient.ui.global.StubFragment
import ru.terrakok.gitlabclient.ui.issue.IssueFlowFragment
import ru.terrakok.gitlabclient.ui.issue.IssueFragment
import ru.terrakok.gitlabclient.ui.issue.IssueInfoFragment
......@@ -27,13 +29,17 @@ import ru.terrakok.gitlabclient.ui.my.todos.MyTodosFragment
import ru.terrakok.gitlabclient.ui.privacypolicy.PrivacyPolicyFragment
import ru.terrakok.gitlabclient.ui.project.ProjectFlowFragment
import ru.terrakok.gitlabclient.ui.project.ProjectFragment
import ru.terrakok.gitlabclient.ui.project.files.ProjectFilesFragment
import ru.terrakok.gitlabclient.ui.project.info.ProjectEventsFragment
import ru.terrakok.gitlabclient.ui.project.info.ProjectInfoContainerFragment
import ru.terrakok.gitlabclient.ui.project.info.ProjectInfoFragment
import ru.terrakok.gitlabclient.ui.project.issues.ProjectIssuesContainerFragment
import ru.terrakok.gitlabclient.ui.project.issues.ProjectIssuesFragment
import ru.terrakok.gitlabclient.ui.project.labels.ProjectLabelsFragment
import ru.terrakok.gitlabclient.ui.project.mergerequest.ProjectMergeRequestsContainerFragment
import ru.terrakok.gitlabclient.ui.project.mergerequest.ProjectMergeRequestsFragment
import ru.terrakok.gitlabclient.ui.project.milestones.ProjectMilestonesContainerFragment
import ru.terrakok.gitlabclient.ui.project.milestones.ProjectMilestonesFragment
import ru.terrakok.gitlabclient.ui.projects.ProjectsContainerFragment