Skip to content

Commit

Permalink
Add ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone authored and torokati44 committed Mar 18, 2024
1 parent e395c08 commit bf88d5c
Show file tree
Hide file tree
Showing 15 changed files with 352 additions and 345 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{kt,kts}]
ktlint_code_style = android_studio
ij_kotlin_name_count_to_use_star_import = 9999
ij_kotlin_name_count_to_use_star_import_for_members = 9999
ktlint_function_naming_ignore_when_annotated_with=Composable
3 changes: 1 addition & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ android {
}
}


splits {
// Configures multiple APKs based on ABI.
abi {
Expand Down Expand Up @@ -121,4 +120,4 @@ if (System.getenv("GITHUB_ACTIONS") == null) {
apiLevel = 26
buildType = "release"
}
}
}
8 changes: 3 additions & 5 deletions app/src/androidTest/java/rs/ruffle/ExampleInstrumentedTest.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package rs.ruffle

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand All @@ -21,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("rs.ruffle", appContext.packageName)
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/rs/ruffle/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import rs.ruffle.ui.theme.RuffleTheme
import java.io.IOException
import rs.ruffle.ui.theme.RuffleTheme

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
58 changes: 29 additions & 29 deletions app/src/main/java/rs/ruffle/Navigation.kt
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package rs.ruffle

import android.net.Uri
import androidx.compose.runtime.Composable
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController

object Destinations {
const val SELECT_SWF_ROUTE = "select"
}

@Composable
fun RuffleNavHost(
navController: NavHostController = rememberNavController(),
openSwf: (uri: Uri) -> Unit
) {
NavHost(
navController = navController,
startDestination = Destinations.SELECT_SWF_ROUTE,
) {
composable(Destinations.SELECT_SWF_ROUTE) {
SelectSwfRoute(
openSwf = openSwf
)
}
}
}
package rs.ruffle

import android.net.Uri
import androidx.compose.runtime.Composable
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController

object Destinations {
const val SELECT_SWF_ROUTE = "select"
}

@Composable
fun RuffleNavHost(
navController: NavHostController = rememberNavController(),
openSwf: (uri: Uri) -> Unit
) {
NavHost(
navController = navController,
startDestination = Destinations.SELECT_SWF_ROUTE
) {
composable(Destinations.SELECT_SWF_ROUTE) {
SelectSwfRoute(
openSwf = openSwf
)
}
}
}
Loading

0 comments on commit bf88d5c

Please sign in to comment.