Skip to content

Commit

Permalink
Updated SDK dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Meisolsson committed Feb 9, 2019
1 parent 367295a commit 4bf0c45
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Expand Up @@ -177,7 +177,7 @@ dependencies {
compileOnly 'com.episode6.hackit.auto.factory:auto-factory-annotations:1.0-beta5'
kapt 'com.google.auto.factory:auto-factory:1.0-beta5'

implementation 'com.github.meisolsson:githubsdk:0.5.1'
implementation 'com.github.meisolsson:githubsdk:0.6.0'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
implementation 'com.xwray:groupie:2.3.0'
implementation 'com.xwray:groupie-kotlin-android-extensions:2.3.0'
Expand Down
Expand Up @@ -147,7 +147,7 @@ class CommitCompareListFragment : BaseFragment(), OnItemClickListener {
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe({ response ->
val compareCommit = response.body()
val files = compareCommit.files()
val files = compareCommit!!.files()
diffStyler!!.setFiles(files)
Collections.sort(files, CommitFileComparator())
updateList(compareCommit)
Expand Down
Expand Up @@ -146,7 +146,7 @@ class CommitListFragment : BaseFragment(), DialogResultListener {
val defaultBranch = repo!!.defaultBranch()
refSingle = if (TextUtils.isEmpty(defaultBranch)) {
repoService.getRepository(repo!!.owner()!!.login(), repo!!.name())
.map { it.body().defaultBranch() }
.map { it.body()!!.defaultBranch() }
.map {
return@map if (TextUtils.isEmpty(it)) {
"master"
Expand Down
Expand Up @@ -164,7 +164,7 @@ class CreateGistActivity : BaseActivity() {
.compose(RxProgress.bindToLifecycle(this, R.string.creating_gist))
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe({ response ->
startActivity(GistsViewActivity.createIntent(response.body()))
startActivity(GistsViewActivity.createIntent(response.body()!!))
setResult(RESULT_OK)
finish()
}, { e ->
Expand Down
Expand Up @@ -86,14 +86,14 @@ class GistsPagerFragment : BaseFragment() {
service.getPublicGists(1)
.flatMap { response ->
val firstPage = response.body()
var randomPage = (Math.random() * (firstPage.last()!! - 1)).toInt()
var randomPage = (Math.random() * (firstPage!!.last()!! - 1)).toInt()
randomPage = Math.max(1, randomPage)

return@flatMap service.getPublicGists(randomPage.toLong())
}
.flatMap { response ->
val gistPage = response.body()
if (gistPage.items().isEmpty()) {
if (gistPage!!.items().isEmpty()) {
var randomPage = (Math.random() * (gistPage.last()!! - 1)).toInt()
randomPage = Math.max(1, randomPage)
return@flatMap service.getPublicGists(randomPage.toLong())
Expand All @@ -102,7 +102,7 @@ class GistsPagerFragment : BaseFragment() {
return@flatMap Single.just(response)
}
.map<Gist> { response ->
val gistPage = response.body()
val gistPage = response.body()!!
if (response.isSuccessful) {
val size = gistPage.items().size
if (size > 0) {
Expand Down
Expand Up @@ -365,7 +365,7 @@ class EditIssueActivity : BaseActivity() {
}

if (issue!!.milestone() != null) {
request.milestone(issue!!.milestone()!!.number()!!.toLong())
request.milestone(issue!!.milestone()!!.number()!!)
}

val labels = ArrayList<String>()
Expand Down
Expand Up @@ -88,7 +88,7 @@ public EditMilestoneTask prompt(Milestone milestone) {
*/
public EditMilestoneTask edit(Milestone milestone) {
if (milestone != null) {
IssueRequest editedIssue = IssueRequest.builder().milestone(milestone.number().longValue()).build();
IssueRequest editedIssue = IssueRequest.builder().milestone(milestone.number()).build();

store.editIssue(repositoryId, issueNumber, editedIssue)
.subscribeOn(Schedulers.io())
Expand Down
Expand Up @@ -97,7 +97,7 @@ class IssuesViewActivity : BaseActivity() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe { response -> repositoryLoaded(response.body()) }
.subscribe { response -> repositoryLoaded(response.body()!!) }
} else {
repositoryLoaded(repo!!)
}
Expand Down
Expand Up @@ -132,7 +132,7 @@ class SearchIssueListFragment : BaseFragment() {
val searchQuery = query + "+repo:" + InfoUtils.createRepoId(repository!!)
return service.searchIssues(searchQuery, null, null, page.toLong())
.map { response ->
val issueSearchPage = response.body()
val issueSearchPage = response.body()!!

Response.success(Page.builder<Issue>()
.first(issueSearchPage.first())
Expand Down
Expand Up @@ -126,7 +126,7 @@ class NotificationListFragment : BaseFragment(), NotificationReadListener {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMapObservable { response ->
val page = response.body()
val page = response.body()!!
if (page.next() == null) {
return@flatMapObservable notificationService
.getNotifications(filters, i.toLong())
Expand Down
Expand Up @@ -132,7 +132,7 @@ class RepositoryContributorsFragment : BaseFragment() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe { response -> startActivity(UserViewActivity.createIntent(response.body())) }
.subscribe { response -> startActivity(UserViewActivity.createIntent(response.body()!!)) }
}
}
}
Expand Up @@ -191,7 +191,7 @@ class RepositoryViewActivity : BaseActivity() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe { response ->
val parent = response.body().parent()
val parent = response.body()!!.parent()
startActivity(RepositoryViewActivity.createIntent(parent!!))
}
} else {
Expand Down Expand Up @@ -271,7 +271,7 @@ class RepositoryViewActivity : BaseActivity() {
.observeOn(AndroidSchedulers.mainThread())
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe({ response ->
val repo = response.body()
val repo = response.body()!!
UriLauncherActivity.launchUri(this, Uri.parse(repo.htmlUrl()))
}, { e -> ToastUtils.show(this, R.string.error_forking_repository) })
}
Expand Down
Expand Up @@ -125,7 +125,7 @@ class SearchRepositoryListFragment : BaseFragment() {
MessageFormat.format(getString(R.string.opening_repository),
InfoUtils.createRepoId(result))))
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe { response -> startActivity(RepositoryViewActivity.createIntent(response.body())) }
.subscribe { response -> startActivity(RepositoryViewActivity.createIntent(response.body()!!)) }
}
}

Expand All @@ -147,7 +147,7 @@ class SearchRepositoryListFragment : BaseFragment() {
.getRepository(repoId.owner()!!.login(), repoId.name())
.subscribe { response ->
if (response.isSuccessful) {
startActivity(RepositoryViewActivity.createIntent(response.body()))
startActivity(RepositoryViewActivity.createIntent(response.body()!!))
val activity = activity
activity?.finish()
}
Expand All @@ -160,7 +160,7 @@ class SearchRepositoryListFragment : BaseFragment() {
private fun loadData(page: Int): Single<Response<Page<Repository>>> {
return service.searchRepositories(getStringExtra(QUERY), null, null, page.toLong())
.map { response ->
val repositorySearchPage = response.body()
val repositorySearchPage = response.body()!!
Response.success(Page.builder<Repository>()
.first(repositorySearchPage.first())
.last(repositorySearchPage.last())
Expand Down
Expand Up @@ -106,7 +106,7 @@ class SearchUserListFragment : BaseFragment() {
private fun loadData(page: Int): Single<Response<Page<User>>> {
return service.searchUsers(getStringExtra(SearchManager.QUERY), null, null, page.toLong())
.map { response ->
val repositorySearchPage = response.body()
val repositorySearchPage = response.body()!!

Response.success(Page.builder<User>()
.first(repositorySearchPage.first())
Expand All @@ -130,7 +130,7 @@ class SearchUserListFragment : BaseFragment() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.`as`(AutoDisposeUtils.bindToLifecycle(this))
.subscribe { response -> startActivity(UserViewActivity.createIntent(response.body())) }
.subscribe { response -> startActivity(UserViewActivity.createIntent(response.body()!!)) }
}
}
}
3 changes: 2 additions & 1 deletion build.gradle
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
}
Expand All @@ -17,6 +17,7 @@ allprojects {
repositories {
jcenter()
google()
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Sep 26 22:05:21 CEST 2018
#Sat Feb 09 17:57:52 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

0 comments on commit 4bf0c45

Please sign in to comment.