Skip to content

Commit 0e0f5d9

Browse files
committed
Merge branch 'feat/authentication/model' of github.com:PeriodPals/periodpals into feat/authentication/model
# Conflicts: # app/src/main/java/com/android/periodpals/MainActivity.kt
2 parents 0caced8 + bdae03a commit 0e0f5d9

File tree

4 files changed

+22
-100
lines changed

4 files changed

+22
-100
lines changed

app/build.gradle.kts

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,26 @@ android {
9696

9797
sonar {
9898
properties {
99-
property("sonar.projectKey", "PeriodPals_periodpals")
99+
property("sonar.projectKey", "periodpals_periodpals")
100100
property("sonar.organization", "periodpals")
101101
property("sonar.host.url", "https://sonarcloud.io")
102102
// Comma-separated paths to the various directories containing the *.xml JUnit report files.
103103
// Each path may be absolute or relative to the project base directory.
104104
property(
105-
"sonar.junit.reportPaths",
106-
"${project.layout.buildDirectory.get()}/test-results/testDebugunitTest/")
105+
"sonar.junit.reportPaths",
106+
"${project.layout.buildDirectory.get()}/test-results/testDebugunitTest/"
107+
)
107108
// Paths to xml files with Android Lint issues. If the main flavor is changed, this file will
108109
// have to be changed too.
109110
property(
110-
"sonar.androidLint.reportPaths",
111-
"${project.layout.buildDirectory.get()}/reports/lint-results-debug.xml")
111+
"sonar.androidLint.reportPaths",
112+
"${project.layout.buildDirectory.get()}/reports/lint-results-debug.xml"
113+
)
112114
// Paths to JaCoCo XML coverage report files.
113115
property(
114-
"sonar.coverage.jacoco.xmlReportPaths",
115-
"${project.layout.buildDirectory.get()}/reports/jacoco/jacocoTestReport/jacocoTestReport.xml")
116+
"sonar.coverage.jacoco.xmlReportPaths",
117+
"${project.layout.buildDirectory.get()}/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
118+
)
116119
}
117120
}
118121

@@ -200,20 +203,19 @@ tasks.register("jacocoTestReport", JacocoReport::class) {
200203
}
201204

202205
val fileFilter =
203-
204-
listOf(
205-
"**/R.class",
206-
"**/R$*.class",
207-
"**/BuildConfig.*",
208-
"**/Manifest*.*",
209-
"**/*Test*.*",
210-
"android/**/*.*",
211-
)
206+
listOf(
207+
"**/R.class",
208+
"**/R$*.class",
209+
"**/BuildConfig.*",
210+
"**/Manifest*.*",
211+
"**/*Test*.*",
212+
"android/**/*.*",
213+
)
212214

213215
val debugTree =
214-
fileTree("${project.layout.buildDirectory.get()}/tmp/kotlin-classes/debug") {
215-
exclude(fileFilter)
216-
}
216+
fileTree("${project.layout.buildDirectory.get()}/tmp/kotlin-classes/debug") {
217+
exclude(fileFilter)
218+
}
217219

218220
val mainSrc = "${project.layout.projectDirectory}/src/main/java"
219221
sourceDirectories.setFrom(files(mainSrc))
@@ -224,5 +226,4 @@ tasks.register("jacocoTestReport", JacocoReport::class) {
224226
include("outputs/code_coverage/debugAndroidTest/connected/*/coverage.ec")
225227
}
226228
)
227-
228229
}

app/src/androidTest/java/com/android/periodpals/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/src/main/java/com/android/periodpals/MainActivity.kt

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ import androidx.compose.runtime.setValue
1818
import androidx.compose.ui.Modifier
1919
import androidx.compose.ui.unit.dp
2020
import com.android.periodpals.ui.theme.PeriodPalsAppTheme
21-
import io.github.jan.supabase.createSupabaseClient
22-
import io.github.jan.supabase.postgrest.Postgrest
23-
import io.github.jan.supabase.postgrest.from
2421
import kotlinx.coroutines.CoroutineDispatcher
2522
import kotlinx.coroutines.Dispatchers
2623
import kotlinx.coroutines.withContext
@@ -43,11 +40,7 @@ class MainActivity : ComponentActivity() {
4340
@Composable
4441
fun CountriesList(dispatcher: CoroutineDispatcher = Dispatchers.IO) {
4542
var countries by remember { mutableStateOf<List<Country>>(listOf()) }
46-
LaunchedEffect(Unit) {
47-
withContext(dispatcher) {
48-
countries = supabase.from("countries").select().decodeList<Country>()
49-
}
50-
}
43+
LaunchedEffect(Unit) { withContext(dispatcher) { countries = listOf(Country(1, "eyyo pogger")) } }
5144
LazyColumn {
5245
items(
5346
countries.size,
@@ -60,14 +53,6 @@ fun CountriesList(dispatcher: CoroutineDispatcher = Dispatchers.IO) {
6053
}
6154
}
6255

63-
val supabase =
64-
createSupabaseClient(
65-
supabaseUrl = "https://bhhjdcvdcfrxczbudraf.supabase.co",
66-
supabaseKey =
67-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJoaGpkY3ZkY2ZyeGN6YnVkcmFmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mjc4ODA4MjMsImV4cCI6MjA0MzQ1NjgyM30.teiPmTsMGNbXBx808uX7enVVLdgxqn4ftvSKjIgfCyQ") {
68-
install(Postgrest)
69-
}
70-
7156
@Serializable
7257
data class Country(
7358
val id: Int,

app/src/test/java/com/android/periodpals/ExampleRobolectricTest.kt

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)