This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Claude Code Run | |
# 現状では Issue の説明およびコメントに応答する形で起動 | |
on: | |
issues: | |
types: [opened] | |
issue_comment: | |
types: [created] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.hkusu.sample.ext | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MediatorLiveData | |
import androidx.lifecycle.Observer | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.launch | |
import kotlin.coroutines.CoroutineContext | |
inline fun <T, U> LiveData<T>.mapNotNull( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.hkusu.sample.ui | |
import android.os.Bundle | |
import android.view.View | |
import androidx.fragment.app.Fragment | |
import io.github.hkusu.sample.databinding.MainFragmentBinding | |
class MainFragment : Fragment(R.layout.main_fragment) { | |
private val binding: MainFragmentBinding by viewBinding() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.hkusu.sample.ext | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MediatorLiveData | |
import androidx.lifecycle.Observer | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.launch | |
import kotlin.coroutines.CoroutineContext | |
inline fun <T, U> LiveData<T>.mapNotNull( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github.dismiss_out_of_range_messages | |
# ktlint | |
Dir.glob("**//build/reports/ktlint-results.xml").each { |report| | |
checkstyle_format.base_path = Dir.pwd | |
checkstyle_format.report report.to_s | |
} | |
# Android Lint | |
Dir.glob("**//build/reports/lint-results*.xml").each { |report| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun onButtonClicked(view: View?) { // unitテスト時はnullを渡す | |
view?.disableContinuousClicks() | |
// do something.. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <T, U> LiveData<T>.map( | |
scope: CoroutineScope, | |
crossinline block: suspend (T) -> U | |
): LiveData<U> { | |
val result = MediatorLiveData<U>() | |
result.addSource(this) { | |
scope.launch { | |
result.postValue(block.invoke(it)) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.hkusu.sample.android.lib.rx; | |
import rx.Observable; | |
import rx.subjects.PublishSubject; | |
import rx.subjects.SerializedSubject; | |
import rx.subjects.Subject; | |
public class Event<T> { | |
private final Subject<T, T> subject = new SerializedSubject<>(PublishSubject.create()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.hkusu.example.lib.type; | |
import android.support.annotation.NonNull; | |
import java.util.LinkedHashSet; | |
import java.util.Set; | |
public class ImmutableSet<T> { | |
private final Set<T> set = new LinkedHashSet<>(); |
NewerOlder