prepare for commits listing

This commit is contained in:
k0shk0sh 2019-09-13 22:48:39 +02:00
parent a6e77c112e
commit a617d5a8ae
9 changed files with 143 additions and 0 deletions

View File

@ -8,6 +8,7 @@ configurations {
buildscript {
ext {
kotlin = '1.3.50'
kotlin_version = '1.3.50'
}
repositories {
google()

62
commits/build.gradle Normal file
View File

@ -0,0 +1,62 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
def conf = rootProject.ext.android
compileSdkVersion conf.compileSdkVersion
defaultConfig {
minSdkVersion conf.minSdkVersion
targetSdkVersion conf.targetSdkVersion
versionCode conf.versionCode
versionName conf.versionName
multiDexEnabled
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
def dependency = rootProject.ext
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':data')
implementation project(':domain')
implementation project(':resources')
implementation project(':extensions')
implementation project(':markdown')
implementation project(':editor')
implementation dependency.kotlin
implementation dependency.supportLibraries
implementation dependency.extrasLibraries
implementation dependency.networking
implementation dependency.rxJava
implementation dependency.extrasLibraries
implementation dependency.dagger
implementation dependency.archs
implementation dependency.firebase
kapt dependency.processing
}

View File

21
commits/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fastaccess.fasthub.commit" />

View File

@ -89,6 +89,35 @@ fragment CommitFragment on Commit {
}
}
fragment FullCommitFragment on Commit {
abbreviatedOid
id
oid
commitUrl
additions
deletions
changedFiles
author {
avatarUrl
name
user {
login
avatarUrl
url
}
}
committedDate
committedViaWeb
status {
state
}
signature {
isValid
state
}
messageHeadline
}
fragment FullIssue on Issue {
id
databaseId
@ -414,4 +443,11 @@ fragment Transferred on TransferredEvent {
number
url
}
}
fragment PageInfoFragment on PageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}

View File

@ -503,4 +503,24 @@ query getMilestones($login: String!, $repo: String!, $page: String) {
}
}
}
}
query getPullRequestCommits($login: String!, $repo: String!, $number: Int!, $page: String) {
repositoryOwner(login: $login) {
repository(name: $repo) {
pullRequest(number: $number) {
changedFiles
additions
deletions
state
commits(first: 30, after: $page) {
totalCount
pageInfo { ... PageInfoFragment }
nodes {
commit { ... FullCommitFragment }
}
}
}
}
}
}

View File

@ -1 +1,2 @@
include ':app', ':data', ':domain', ':resources', ':extensions', ':markdown', ':editor'
include ':commits'