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 fr.delcey.pokedexfullflow | |
import android.location.Location | |
import androidx.lifecycle.LiveData | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.flowOf | |
import kotlin.random.Random | |
class AllInOneRepository { |
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
import android.util.LruCache; | |
import androidx.annotation.MainThread; | |
import androidx.annotation.NonNull; | |
import androidx.lifecycle.LiveData; | |
import androidx.lifecycle.MutableLiveData; | |
import fr.delcey.go4lunch.data.restaurant_details.pojo.RestaurantDetailsResponse; | |
import fr.delcey.go4lunch.data.restaurant_details.pojo.RestaurantDetailsResponseWrapper; | |
import retrofit2.Call; |
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
// open JaCoCo report after generation | |
def openReport(htmlOutDir) { | |
final reportPath = "$htmlOutDir\\index.html" | |
println "HTML Report: $reportPath" | |
def os = org.gradle.internal.os.OperatingSystem.current() | |
if (os.isWindows()) { | |
exec { commandLine 'cmd', '/c', "start $reportPath" } | |
} else if (os.isMacOsX()) { |
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
public class NearbyRestaurantsRepository { | |
private static final String TYPE = "restaurant"; | |
// Round the GPS coordinate to avoid re-querying Google for a position that would be only a few meters away | |
private static final int GPS_SCALE = 2; | |
@NonNull | |
private final NearbyRestaurantsApi nearbyRestaurantsApi; |
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
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.runBlockingTest | |
import kotlinx.coroutines.test.setMain | |
import org.junit.rules.TestRule | |
import org.junit.runner.Description | |
import org.junit.runners.model.Statement |
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
import android.view.View; | |
import androidx.recyclerview.widget.RecyclerView; | |
import androidx.test.espresso.NoMatchingViewException; | |
import androidx.test.espresso.ViewAssertion; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.Matchers.is; | |
public class RecyclerViewItemCountAssertion implements ViewAssertion { |
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
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.runBlockingTest | |
import kotlinx.coroutines.test.setMain | |
import org.junit.rules.TestRule | |
import org.junit.runner.Description | |
import org.junit.runners.model.Statement |
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
<activity | |
android:name=".view.dispatcher.DispatcherActivity" | |
android:theme="@style/Theme.Go4Lunch.NoActionBar.Transparent"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> |
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
private void initMeetingsRecyclerView() { | |
final MeetingAdapter adapter = new MeetingAdapter(this); | |
RecyclerView recyclerView = findViewById(R.id.meeting_rv); | |
recyclerView.setLayoutManager(new LinearLayoutManager(this)); | |
recyclerView.setAdapter(adapter); | |
viewModel.getMeetingModelsLiveData().observe(this, meetingModels -> adapter.submitList(meetingModels)); | |
} |
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
import androidx.annotation.NonNull; | |
import androidx.lifecycle.ViewModel; | |
import androidx.lifecycle.ViewModelProvider; | |
import java.time.Clock; | |
import fr.delcey.mareu.domain.MeetingRepository; | |
import fr.delcey.mareu.ui.create.CreateMeetingViewModel; | |
import fr.delcey.mareu.ui.meetings.MeetingViewModel; |