diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d3352..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 4efe995..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-jetpack-compose-template
\ No newline at end of file
diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml
deleted file mode 100644
index 4a53bee..0000000
--- a/.idea/AndroidProjectSystem.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index b86273d..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
deleted file mode 100644
index b268ef3..0000000
--- a/.idea/deploymentTargetSelector.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index 97f0a8e..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
deleted file mode 100644
index f8467b4..0000000
--- a/.idea/kotlinc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/migrations.xml b/.idea/migrations.xml
deleted file mode 100644
index f8051a6..0000000
--- a/.idea/migrations.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 74dd639..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 16660f1..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1dd..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 56e179d..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Apache License
-Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
diff --git a/README.md b/README.md
deleted file mode 100644
index ada133d..0000000
--- a/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# Jetpack Compose Template
-
-Welcome to the Jetpack Compose Template! This template provides a structured starting point for building Android applications using the Jetpack Compose UI toolkit. Jetpack Compose simplifies UI development with a declarative approach, allowing you to create interactive and beautiful UIs with less code.
-
-## Project Overview
-
-This project demonstrates the use of Jetpack Compose to create a modern Android app with a clean and maintainable architecture.
-
-### Key Components
-
-- **Jetpack Compose:** The modern UI toolkit for building native UIs.
-- **ViewModel:** Manage UI-related data and state using the ViewModel architecture component.
-- **Hilt:** Use Hilt for dependency injection, ensuring clean and modular code.
-- **Navigation Component:** Handle navigation between different screens seamlessly.
-- **Coroutines:** Utilize Kotlin's Coroutines for managing asynchronous tasks.
-- **Data Persistence:** Leverage Room for local data storage.
-
-## Getting Started
-
-1. **Clone the Repository:** `git clone https://github.com/ferhatozcelik/jetpack-compose-template.git`
-2. **Open in Android Studio:** Import the project into Android Studio.
-3. **Build and Run:** Build and run the app to see the Jetpack Compose magic in action.
-
-## Project Structure
-
-- `app` module: Contains the main application code.
- - `src/main/java or src/main/kotlin`: Kotlin source code.
- - `src/main/res`: Resources like layouts, strings, and drawables.
-
-## Customize and Extend
-
-Feel free to customize and extend this template to match the requirements of your specific project. Experiment with different Composables, UI layouts, and navigation flows to create your unique app.
-
-## Author
-
-👤 Your Name
-
-- GitHub: [@ferhatozcelik](https://github.com/ferhatozcelik)
-- LinkedIn: [Ferhat OZCELIK](https://www.linkedin.com/in/ferhatozcelik/)
-
-## License
-
-This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
-
-If you find this template helpful, please consider giving it a ⭐️ on GitHub. Your support is greatly appreciated!
diff --git a/app/.gitignore b/app/.gitignore
index d22744b..42afabf 100644
--- a/app/.gitignore
+++ b/app/.gitignore
@@ -1,2 +1 @@
-/build
-/.idea/**
\ No newline at end of file
+/build
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
deleted file mode 100644
index c7a3e79..0000000
--- a/app/build.gradle
+++ /dev/null
@@ -1,134 +0,0 @@
-plugins {
- alias(libs.plugins.com.android.application)
- alias(libs.plugins.org.jetbrains.kotlin.android)
- alias(libs.plugins.com.google.dagger.hilt.android)
- alias(libs.plugins.com.google.devtools.ksp)
- id('kotlin-parcelize')
- // id("com.google.gms.google-services") // Google Play Services
- // id("com.google.firebase.crashlytics") // Google Play Services
-}
-hilt {
- enableAggregatingTask = true
-}
-
-android {
- namespace 'com.ferhatozcelik.jetpackcomposetemplate'
- compileSdk appCompileSdkVersion
-
- defaultConfig {
- applicationId "com.ferhatozcelik.jetpackcomposetemplate"
- minSdk appMinSdkVersion
- targetSdk appTargetSdkVersion
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary true
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- }
- composeOptions {
- kotlinCompilerExtensionVersion '1.5.3'
- }
- packagingOptions {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
-}
-
-dependencies {
-
- // Kotlin
- implementation(libs.kotlin.stdlib)
- implementation(libs.core.ktx)
- implementation(libs.appcompat)
-
- // Compose
- implementation(libs.activity.compose)
- implementation(platform(libs.compose.bom))
- implementation(libs.ui)
- implementation(libs.ui.graphics)
- implementation(libs.ui.tooling.preview)
- implementation(libs.material3)
-
- // JUnit
- testImplementation(libs.junit)
- androidTestImplementation(libs.androidx.test.ext.junit)
- androidTestImplementation(libs.espresso.core)
- androidTestImplementation(platform(libs.compose.bom))
- androidTestImplementation(libs.ui.test.junit4)
- debugImplementation(libs.ui.tooling)
- debugImplementation(libs.ui.test.manifest)
-
- // Material Design
- implementation(libs.material)
- implementation libs.androidx.viewpager2
-
- // ConstraintLayout
- implementation(libs.constraintlayout)
-
- // Legacy Support Library
- implementation(libs.androidx.legacy.support.v4)
-
- // Multidex
- implementation(libs.androidx.multidex)
-
- // DeSugar Use Java 8 language features and APIs
- coreLibraryDesugaring(libs.desugar.jdk.libs)
-
- // Dagger Hilt
- implementation(libs.hilt)
- ksp(libs.hilt.compiler)
-
- // Room
- implementation(libs.room)
- implementation(libs.room.runtime)
- ksp(libs.room.compiler)
-
- // Coroutines
- implementation(libs.kotlinx.coroutines.core)
- implementation(libs.kotlinx.coroutines.android)
-
- // Lifecycle Scopes
- implementation(libs.lifecycle)
- implementation(libs.lifecycle.runtime)
- implementation(libs.lifecycle.runtime.ktx)
-
- // Retrofit
- implementation(libs.retrofit)
- implementation(libs.converter.gson)
- implementation(libs.logging.interceptor)
-
- // Navigation
- implementation libs.androidx.hilt.navigation.compose
- implementation libs.androidx.navigation.compose
-
-
- // Glide
- implementation(libs.glide)
- ksp(libs.ksp)
-
- // Firebase
- // implementation(libs.firebase)
- // implementation(libs.analytics)
- // implementation(libs.crashlytics)
-
-}
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
new file mode 100644
index 0000000..1c030e6
--- /dev/null
+++ b/app/build.gradle.kts
@@ -0,0 +1,59 @@
+plugins {
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
+ alias(libs.plugins.kotlin.compose)
+}
+
+android {
+ namespace = "com.example.gyromin"
+ compileSdk = 35
+
+ defaultConfig {
+ applicationId = "com.example.gyromin"
+ minSdk = 21
+ targetSdk = 35
+ versionCode = 1
+ versionName = "1.0"
+
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ isMinifyEnabled = false
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro"
+ )
+ }
+ }
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+ kotlinOptions {
+ jvmTarget = "11"
+ }
+ buildFeatures {
+ compose = true
+ }
+}
+
+dependencies {
+
+ implementation(libs.androidx.core.ktx)
+ implementation(libs.androidx.lifecycle.runtime.ktx)
+ implementation(libs.androidx.activity.compose)
+ implementation(platform(libs.androidx.compose.bom))
+ implementation(libs.androidx.ui)
+ implementation(libs.androidx.ui.graphics)
+ implementation(libs.androidx.ui.tooling.preview)
+ implementation(libs.androidx.material3)
+ testImplementation(libs.junit)
+ androidTestImplementation(libs.androidx.junit)
+ androidTestImplementation(libs.androidx.espresso.core)
+ androidTestImplementation(platform(libs.androidx.compose.bom))
+ androidTestImplementation(libs.androidx.ui.test.junit4)
+ debugImplementation(libs.androidx.ui.tooling)
+ debugImplementation(libs.androidx.ui.test.manifest)
+}
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/ferhatozcelik/jetpackcomposetemplate/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/gyromin/ExampleInstrumentedTest.kt
similarity index 81%
rename from app/src/androidTest/java/com/ferhatozcelik/jetpackcomposetemplate/ExampleInstrumentedTest.kt
rename to app/src/androidTest/java/com/example/gyromin/ExampleInstrumentedTest.kt
index 47e0ca6..2e9af28 100644
--- a/app/src/androidTest/java/com/ferhatozcelik/jetpackcomposetemplate/ExampleInstrumentedTest.kt
+++ b/app/src/androidTest/java/com/example/gyromin/ExampleInstrumentedTest.kt
@@ -1,4 +1,4 @@
-package com.ferhatozcelik.jetpackcomposetemplate
+package com.example.gyromin
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.ferhatozcelik.myapplication", appContext.packageName)
+ assertEquals("com.example.gyromin", appContext.packageName)
}
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index cda27f9..286cd44 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,10 +2,9 @@
-
-
+
+
+ android:label="@string/app_name"
+ android:theme="@style/Theme.Gyromin">
diff --git a/app/src/main/java/com/example/gyromin/MainActivity.kt b/app/src/main/java/com/example/gyromin/MainActivity.kt
new file mode 100644
index 0000000..1aa6ab4
--- /dev/null
+++ b/app/src/main/java/com/example/gyromin/MainActivity.kt
@@ -0,0 +1,113 @@
+package com.example.gyromin
+
+import android.media.AudioManager
+import android.media.AudioTrack
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.activity.enableEdgeToEdge
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.padding
+import androidx.compose.material3.Button
+import androidx.compose.material3.Scaffold
+import androidx.compose.material3.Text
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import com.example.gyromin.ui.theme.GyrominTheme
+import kotlin.math.atan
+import kotlin.math.sin
+
+class MainActivity : ComponentActivity() {
+ private lateinit var Track: AudioTrack
+ private var isPlaying: Boolean = false
+ private val Fs: Int = 44100
+ private val buffLength: Int = AudioTrack.getMinBufferSize(Fs, 4, 2)
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ enableEdgeToEdge()
+ setContent {
+ GyrominTheme {
+ Scaffold { padding ->
+ Column(
+ modifier = Modifier.fillMaxSize(),
+ verticalArrangement = Arrangement.Center,
+ horizontalAlignment = Alignment.CenterHorizontally
+ ) {
+ Button(onClick = {
+ if (!isPlaying)
+ // Create a new thread to play the audio.
+
+ // Performing intensive operations and computations on the main UI thread,
+ // makes the app slow.
+
+ // That is, it is a bad idea to do intensive computations on main UI thread,
+ // so it is recommended to create a new thread to do computations in the background
+
+ Thread {
+ initTrack()
+ startPlaying()
+ playback()
+ }.start()
+ else stopPlaying()
+ }) {
+ Text("Play / Pause", modifier = Modifier.padding(padding))
+ }
+ Text(
+ if (isPlaying) "Playing" else "Stopped",
+ modifier = Modifier.padding(padding)
+ )
+ }
+ }
+ }
+ }
+ }
+
+ private fun initTrack() {
+ // Very similar to opening a stream in PyAudio
+ // In Android create a AudioTrack instance and initialize it with different parameters
+
+ // AudioTrack is deprecated for some android versions
+ // Please look up for other alternatives if this does not work
+ Track = AudioTrack(
+ AudioManager.MODE_NORMAL, Fs, 4,
+ 2, buffLength, AudioTrack.MODE_STREAM
+ )
+ }
+
+ private fun playback() {
+ // simple sine wave generator
+ val frame_out = ShortArray(buffLength)
+ val amplitude = 32767
+ val frequency = 440
+ val twopi: Double = 8.0 * atan(1.0)
+ var phase = 0.0
+
+ while (isPlaying) {
+ for (i in 0 until buffLength) {
+ frame_out[i] = (amplitude * sin(phase)).toInt().toShort()
+ phase += twopi * frequency / Fs
+ if (phase > twopi) {
+ phase -= twopi
+ }
+ }
+ Track.write(frame_out, 0, buffLength)
+ }
+ }
+
+ private fun startPlaying() {
+ Track.play()
+ isPlaying = true
+ }
+
+ private fun stopPlaying() {
+ if (isPlaying) {
+ isPlaying = false
+ // Stop playing the audio data and release the resources
+ Track.stop()
+ Track.release()
+ }
+ }
+}
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Color.kt b/app/src/main/java/com/example/gyromin/ui/theme/Color.kt
similarity index 71%
rename from app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Color.kt
rename to app/src/main/java/com/example/gyromin/ui/theme/Color.kt
index e672e68..d6b69b7 100644
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Color.kt
+++ b/app/src/main/java/com/example/gyromin/ui/theme/Color.kt
@@ -1,4 +1,4 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.theme
+package com.example.gyromin.ui.theme
import androidx.compose.ui.graphics.Color
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Theme.kt b/app/src/main/java/com/example/gyromin/ui/theme/Theme.kt
similarity index 73%
rename from app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Theme.kt
rename to app/src/main/java/com/example/gyromin/ui/theme/Theme.kt
index 5ce5f8c..b5a564c 100644
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Theme.kt
+++ b/app/src/main/java/com/example/gyromin/ui/theme/Theme.kt
@@ -1,4 +1,4 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.theme
+package com.example.gyromin.ui.theme
import android.app.Activity
import android.os.Build
@@ -9,11 +9,7 @@ import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.SideEffect
-import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.platform.LocalView
-import androidx.core.view.WindowCompat
private val DarkColorScheme = darkColorScheme(
primary = Purple80,
@@ -38,7 +34,7 @@ private val LightColorScheme = lightColorScheme(
)
@Composable
-fun MyApplicationTheme(
+fun GyrominTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
@@ -53,14 +49,6 @@ fun MyApplicationTheme(
darkTheme -> DarkColorScheme
else -> LightColorScheme
}
- val view = LocalView.current
- if (!view.isInEditMode) {
- SideEffect {
- val window = (view.context as Activity).window
- window.statusBarColor = colorScheme.primary.toArgb()
- WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
- }
- }
MaterialTheme(
colorScheme = colorScheme,
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Type.kt b/app/src/main/java/com/example/gyromin/ui/theme/Type.kt
similarity index 94%
rename from app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Type.kt
rename to app/src/main/java/com/example/gyromin/ui/theme/Type.kt
index 8deb4de..ce261e7 100644
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/theme/Type.kt
+++ b/app/src/main/java/com/example/gyromin/ui/theme/Type.kt
@@ -1,4 +1,4 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.theme
+package com.example.gyromin.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/App.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/App.kt
deleted file mode 100644
index 451718a..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/App.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate
-
-import android.app.Application
-import dagger.hilt.android.HiltAndroidApp
-
-@HiltAndroidApp
-class App : Application()
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/dao/ExampleDao.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/dao/ExampleDao.kt
deleted file mode 100644
index 08c806b..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/dao/ExampleDao.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.dao
-
-import androidx.room.*
-import com.ferhatozcelik.jetpackcomposetemplate.data.entity.ExampleEntity
-
-@Dao
-interface ExampleDao {
-
- @Query("SELECT * FROM example_table")
- fun getExampleData(): List
-
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun insert(search: ExampleEntity?)
-
- @Update
- suspend fun update(search: ExampleEntity)
-
- @Delete
- suspend fun delete(search: ExampleEntity)
-
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/entity/ExampleEntity.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/entity/ExampleEntity.kt
deleted file mode 100644
index e6b2483..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/entity/ExampleEntity.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.entity
-
-import android.os.Parcelable
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import kotlinx.parcelize.Parcelize
-
-@Parcelize
-@Entity(tableName = "example_table")
-data class ExampleEntity(
- @PrimaryKey(autoGenerate = true)
- var id: Int? = null,
- val title: String?,
- val description: String?
-) : Parcelable
-
-
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/local/AppDatabase.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/local/AppDatabase.kt
deleted file mode 100644
index 739255b..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/local/AppDatabase.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.local
-
-import androidx.room.Database
-import androidx.room.RoomDatabase
-import androidx.room.TypeConverters
-import com.ferhatozcelik.jetpackcomposetemplate.data.dao.ExampleDao
-import com.ferhatozcelik.jetpackcomposetemplate.data.entity.ExampleEntity
-import com.ferhatozcelik.jetpackcomposetemplate.di.ApplicationScope
-import kotlinx.coroutines.CoroutineScope
-import javax.inject.Inject
-import javax.inject.Provider
-
-@Database(entities = [ExampleEntity::class], version = 1)
-@TypeConverters(Converters::class)
-abstract class AppDatabase : RoomDatabase() {
-
- abstract fun getExampleDao(): ExampleDao
-
- class Callback @Inject constructor(
- private val database: Provider,
- @ApplicationScope private val applicationScope: CoroutineScope
- ) : RoomDatabase.Callback()
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/local/Converters.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/local/Converters.kt
deleted file mode 100644
index 97a5756..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/local/Converters.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.local
-
-import androidx.room.TypeConverter
-import java.util.Date
-
-class Converters {
-
- @TypeConverter
- fun fromTimestamp(value: Long?): Date {
- return value?.let { Date(it) } ?: Date(System.currentTimeMillis())
- }
-
- @TypeConverter
- fun toTimestamp(value: Date?): Long {
- return value?.let { value.time } ?: System.currentTimeMillis()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/model/ExampleModel.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/model/ExampleModel.kt
deleted file mode 100644
index 4f9c26b..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/model/ExampleModel.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.model
-
-import com.google.gson.annotations.SerializedName
-
-data class ExampleModel(
- @SerializedName("title")
- var title: String?,
- @SerializedName("description")
- var description: String?
-)
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/model/Resource.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/model/Resource.kt
deleted file mode 100644
index 3e9d944..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/model/Resource.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.model
-
-sealed class Resource {
- object Loading : Resource()
- data class Success(val data: Any) : Resource()
- data class Error(val errorMessage: String) : Resource()
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/remote/AppApi.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/remote/AppApi.kt
deleted file mode 100644
index bb7a6aa..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/remote/AppApi.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.remote
-
-import com.ferhatozcelik.jetpackcomposetemplate.data.model.ExampleModel
-import retrofit2.Response
-import retrofit2.http.*
-
-interface AppApi {
-
- @GET("/api/v1/example")
- suspend fun getExampleResult(): Response>
-
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/repository/ExampleRepository.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/repository/ExampleRepository.kt
deleted file mode 100644
index d72cc6a..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/data/repository/ExampleRepository.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.data.repository
-
-import com.ferhatozcelik.jetpackcomposetemplate.data.dao.ExampleDao
-import com.ferhatozcelik.jetpackcomposetemplate.data.remote.AppApi
-import javax.inject.Inject
-import javax.inject.Singleton
-
-
-@Singleton
-class ExampleRepository @Inject constructor(private val appApi: AppApi, private val exampleDao: ExampleDao)
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/ApiModule.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/ApiModule.kt
deleted file mode 100644
index 26a1a09..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/ApiModule.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.di
-
-import com.ferhatozcelik.jetpackcomposetemplate.data.remote.AppApi
-import com.ferhatozcelik.jetpackcomposetemplate.util.BASE_URL
-import dagger.Module
-import dagger.Provides
-import dagger.hilt.InstallIn
-import dagger.hilt.components.SingletonComponent
-import okhttp3.OkHttpClient
-import okhttp3.logging.HttpLoggingInterceptor
-import retrofit2.Retrofit
-import retrofit2.converter.gson.GsonConverterFactory
-import javax.inject.Singleton
-
-@Module
-@InstallIn(SingletonComponent::class)
-object ApiModule {
-
- @Provides
- @Singleton
- fun provideLoggingInterceptor(): HttpLoggingInterceptor {
- return HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)
- }
-
- @Provides
- @Singleton
- fun provideOkHttpClient(logging: HttpLoggingInterceptor): OkHttpClient {
- return OkHttpClient.Builder().addInterceptor(logging).build()
- }
-
- @Provides
- @Singleton
- fun provideRetrofit(client: OkHttpClient): Retrofit {
- return Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(client).build()
- }
-
- @Provides
- @Singleton
- fun provideAppApi(retrofit: Retrofit): AppApi {
- return retrofit.create(AppApi::class.java)
- }
-
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/AppModule.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/AppModule.kt
deleted file mode 100644
index dca3462..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/AppModule.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.di
-
-import dagger.Module
-import dagger.Provides
-import dagger.hilt.InstallIn
-import dagger.hilt.components.SingletonComponent
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.SupervisorJob
-import javax.inject.Qualifier
-import javax.inject.Singleton
-
-@Module
-@InstallIn(SingletonComponent::class)
-object AppModule {
-
- @ApplicationScope
- @Provides
- @Singleton
- fun provideApplicationScope(): CoroutineScope {
- return CoroutineScope(SupervisorJob())
- }
-
-}
-
-@Retention(AnnotationRetention.RUNTIME)
-@Qualifier
-annotation class ApplicationScope
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/DatabaseModule.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/DatabaseModule.kt
deleted file mode 100644
index 5624553..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/di/DatabaseModule.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.di
-
-import android.app.Application
-import androidx.room.Room
-import com.ferhatozcelik.jetpackcomposetemplate.data.dao.ExampleDao
-import com.ferhatozcelik.jetpackcomposetemplate.data.local.AppDatabase
-import dagger.Module
-import dagger.Provides
-import dagger.hilt.InstallIn
-import dagger.hilt.components.SingletonComponent
-import javax.inject.Singleton
-
-@Module
-@InstallIn(SingletonComponent::class)
-object DatabaseModule {
-
- @Provides
- @Singleton
- fun provideDatabase(application: Application, callback: AppDatabase.Callback): AppDatabase {
- return Room.databaseBuilder(application, AppDatabase::class.java, "local_database").fallbackToDestructiveMigration().addCallback(callback).build()
- }
-
- @Provides
- fun provideExampleDao(database: AppDatabase): ExampleDao {
- return database.getExampleDao()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/navigation/NavGraph.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/navigation/NavGraph.kt
deleted file mode 100644
index 74cce5d..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/navigation/NavGraph.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.navigation
-
-import androidx.compose.runtime.Composable
-import androidx.navigation.NavHostController
-import androidx.navigation.NavType
-import androidx.navigation.compose.NavHost
-import androidx.navigation.compose.composable
-import androidx.navigation.navArgument
-import com.ferhatozcelik.jetpackcomposetemplate.ui.detail.DetailScreen
-import com.ferhatozcelik.jetpackcomposetemplate.ui.home.MainScreen
-
-@Composable
-fun NavGraph(navController: NavHostController) {
-
- NavHost(
- navController = navController, startDestination = Screen.Main.route
- ) {
-
- composable(Screen.Main.route) {
- MainScreen(navController = navController)
- }
- composable(
- "${Screen.Detail.route}/{id}",
- arguments = listOf(navArgument("id") { type = NavType.IntType })
- ) {
- DetailScreen(navController = navController, id = it.arguments?.getInt("id") ?: 0)
- }
- }
-}
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/navigation/Screen.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/navigation/Screen.kt
deleted file mode 100644
index c16a1c7..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/navigation/Screen.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.navigation
-
-sealed class Screen(val route: String) {
- object Main : Screen("main_screen")
- object Detail : Screen("detail_screen")
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/activitys/MainActivity.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/activitys/MainActivity.kt
deleted file mode 100644
index 94c7849..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/activitys/MainActivity.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.activitys
-
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.Surface
-import androidx.navigation.compose.rememberNavController
-import com.ferhatozcelik.jetpackcomposetemplate.navigation.NavGraph
-import com.ferhatozcelik.jetpackcomposetemplate.ui.theme.MyApplicationTheme
-import dagger.hilt.android.AndroidEntryPoint
-
-@AndroidEntryPoint
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- MyApplicationTheme {
- val navController = rememberNavController()
- Surface(color = MaterialTheme.colorScheme.background) {
- NavGraph(navController = navController)
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailScreen.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailScreen.kt
deleted file mode 100644
index 2266d5a..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailScreen.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.detail
-
-import android.annotation.SuppressLint
-import androidx.compose.foundation.layout.*
-import androidx.compose.material.*
-import androidx.compose.material.icons.filled.*
-import androidx.compose.material3.Text
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.hilt.navigation.compose.hiltViewModel
-import androidx.navigation.NavController
-import java.util.*
-
-
-@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
-@Composable
-fun DetailScreen(
- viewModel: DetailViewModel = hiltViewModel(),
- navController: NavController,
- id: Int
-) {
-
-
- Column(
- modifier = Modifier.fillMaxSize(),
- verticalArrangement = Arrangement.Center,
- horizontalAlignment = Alignment.CenterHorizontally
- ) {
- Text(text = id.toString())
-
- }
-
-}
-
-
-
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailScreenState.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailScreenState.kt
deleted file mode 100644
index 400bbe0..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailScreenState.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.detail
-
-data class DetailScreenState(
- val isLoading: Boolean = false,
-)
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailViewModel.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailViewModel.kt
deleted file mode 100644
index 63f1f73..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/detail/DetailViewModel.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.detail
-
-import androidx.lifecycle.ViewModel
-import com.ferhatozcelik.jetpackcomposetemplate.data.repository.ExampleRepository
-import dagger.hilt.android.lifecycle.HiltViewModel
-import javax.inject.Inject
-
-
-@HiltViewModel
-class DetailViewModel @Inject constructor(private val exampleRepository: ExampleRepository) : ViewModel() {
- private val TAG = DetailViewModel::class.java.simpleName
-
-
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/HomeScreenState.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/HomeScreenState.kt
deleted file mode 100644
index a6dcd18..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/HomeScreenState.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.home
-
-data class HomeScreenState(
- val isLoading: Boolean = false,
-)
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/HomeViewModel.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/HomeViewModel.kt
deleted file mode 100644
index 64285b4..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/HomeViewModel.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.home
-
-import androidx.lifecycle.ViewModel
-import com.ferhatozcelik.jetpackcomposetemplate.data.repository.ExampleRepository
-import dagger.hilt.android.lifecycle.HiltViewModel
-import javax.inject.Inject
-
-@HiltViewModel
-class HomeViewModel @Inject constructor(private val exampleRepository: ExampleRepository) : ViewModel() {
- private val TAG = HomeViewModel::class.java.simpleName
-
-
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/MainScreen.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/MainScreen.kt
deleted file mode 100644
index 0674fd9..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/ui/home/MainScreen.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.ui.home
-
-import android.annotation.SuppressLint
-import androidx.compose.foundation.layout.*
-import androidx.compose.material3.Button
-import androidx.compose.material3.Text
-import androidx.compose.runtime.*
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.hilt.navigation.compose.hiltViewModel
-import androidx.navigation.NavHostController
-import com.ferhatozcelik.jetpackcomposetemplate.navigation.Screen
-
-@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
-@Composable
-fun MainScreen(
- viewModel: HomeViewModel = hiltViewModel(),
- navController: NavHostController,
-) {
-
- Column(
- modifier = Modifier.fillMaxSize(),
- verticalArrangement = Arrangement.Center,
- horizontalAlignment = Alignment.CenterHorizontally
- ) {
-
- Button(onClick = {
- navController.navigate(Screen.Detail.route + "/123")
- }) {
- Text(text = "Go to Detail")
- }
- }
-}
-
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/Constants.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/Constants.kt
deleted file mode 100644
index 15539fa..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/Constants.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.util
-
-const val BASE_URL = "https://api.ferhatozcelik.com"
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/Extensions.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/Extensions.kt
deleted file mode 100644
index 5fe62bd..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/Extensions.kt
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.util
-
-import android.content.ActivityNotFoundException
-import android.content.Context
-import android.content.Intent
-import android.net.Uri
-import android.util.Log
-import android.view.View
-import android.widget.EditText
-import android.widget.Toast
-
-fun View.show() {
- visibility = View.VISIBLE
-}
-
-fun View.gone() {
- visibility = View.GONE
-}
-
-fun Context.toast(message: String) {
- Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
-}
-
-fun String.debug(message: String) {
- Log.d(this, message)
-}
-
-fun EditText.modifyText(numberText: String) {
- this.setText(numberText)
- this.setSelection(numberText.length)
-}
-
-fun Context.goURL(url: String) {
- try {
- val myIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
- startActivity(myIntent)
- } catch (e: ActivityNotFoundException) {
- this.toast("No application can handle this request. Please install a webbrowser")
- e.printStackTrace()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/NetworkUtil.kt b/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/NetworkUtil.kt
deleted file mode 100644
index 504b7a4..0000000
--- a/app/src/main/java/com/ferhatozcelik/jetpackcomposetemplate/util/NetworkUtil.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.ferhatozcelik.jetpackcomposetemplate.util
-
-import android.content.Context
-import android.net.ConnectivityManager
-import android.net.NetworkCapabilities
-
-class NetworkUtil {
- companion object {
- fun hasInternetConnection(context: Context): Boolean {
- val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
-
- val activeNetwork = connectivityManager.activeNetwork ?: return false
- val capabilities = connectivityManager.getNetworkCapabilities(activeNetwork) ?: return false
- return when {
- capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> true
- capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> true
- capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) -> true
- else -> false
- }
- return false
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3de1a39..355af28 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,3 +1,3 @@
- My Application
+ Gyromin
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index e48770a..fc496bd 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
index fa0f996..4df9255 100644
--- a/app/src/main/res/xml/backup_rules.xml
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -2,7 +2,7 @@
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
- Note: This file is ignored for devices older that API 31
+ Note: This file is ignored for devices older than API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
diff --git a/app/src/test/java/com/ferhatozcelik/jetpackcomposetemplate/ExampleUnitTest.kt b/app/src/test/java/com/example/gyromin/ExampleUnitTest.kt
similarity index 86%
rename from app/src/test/java/com/ferhatozcelik/jetpackcomposetemplate/ExampleUnitTest.kt
rename to app/src/test/java/com/example/gyromin/ExampleUnitTest.kt
index e843795..e3cc02c 100644
--- a/app/src/test/java/com/ferhatozcelik/jetpackcomposetemplate/ExampleUnitTest.kt
+++ b/app/src/test/java/com/example/gyromin/ExampleUnitTest.kt
@@ -1,4 +1,4 @@
-package com.ferhatozcelik.jetpackcomposetemplate
+package com.example.gyromin
import org.junit.Test
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 141db03..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-plugins {
- alias(libs.plugins.com.android.application) apply false
- alias(libs.plugins.org.jetbrains.kotlin.android) apply false
- alias(libs.plugins.com.android.library) apply false
- alias(libs.plugins.com.google.dagger.hilt.android) apply false
- alias(libs.plugins.org.jetbrains.kotlin.jvm) apply false
- alias(libs.plugins.com.google.devtools.ksp) apply false
- // alias(libs.plugins.com.google.gms.google.services) apply false // Google Play Services
- // alias(libs.plugins.com.google.firebase.crashlytics) apply false // Google Play Services
-}
-
-ext {
- appCompileSdkVersion = 34
- appTargetSdkVersion = 33
- appMinSdkVersion = 21
-}
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000..952b930
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,6 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+ alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.kotlin.android) apply false
+ alias(libs.plugins.kotlin.compose) apply false
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 3c5031e..20e2a01 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,8 +8,8 @@
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 4f793bd..d9761d5 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,114 +1,32 @@
[versions]
agp = "8.9.0"
-hilt-navigation-compose = "1.0.0"
-navigation-compose = "2.5.3"
-org-jetbrains-kotlin-android = "1.9.10"
-core-ktx = "1.9.0"
+kotlin = "2.0.21"
+coreKtx = "1.10.1"
junit = "4.13.2"
-androidx-test-ext-junit = "1.1.5"
-espresso-core = "3.5.1"
-lifecycle-runtime-ktx = "2.6.2"
-activity-compose = "1.8.0"
-compose-bom = "2023.03.00"
-androidx-multidex = "2.0.1"
-annotation = "1.7.0"
-desugar_jdk_libs = "2.0.3"
-glide-ksp = "4.14.2"
-kotlin-stdlib = "1.9.10"
-kotlinx-coroutines-core = "1.6.4"
-legacy-support-v4 = "1.0.0"
-lifecycle-extensions = "2.2.0"
-logging-interceptor = "4.7.2"
-appcompat = "1.6.1"
-material = "1.9.0"
-constraintlayout = "2.1.4"
-preference-ktx = "1.2.1"
-retrofit = "2.9.0"
-room = "2.5.2"
-hilt = "2.48"
-multidex = "1.0.3"
-fragment = "1.6.1"
-lifecycle = "2.6.2"
-gson = "2.10.1"
-glide = "4.16.0"
-google-services = "4.4.0"
-firebase-bom = "32.3.1"
-crashlytics = "2.9.9"
-ksp = "1.9.0-1.0.12"
-squareup-logging-interceptor = "4.7.2"
-viewpager2 = "1.0.0"
+junitVersion = "1.1.5"
+espressoCore = "3.5.1"
+lifecycleRuntimeKtx = "2.6.1"
+activityCompose = "1.8.0"
+composeBom = "2024.09.00"
[libraries]
-
-androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hilt-navigation-compose" }
-androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation-compose" }
-androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "viewpager2" }
-kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin-stdlib" }
-androidx-legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "legacy-support-v4" }
-androidx-multidex = { module = "androidx.multidex:multidex", version.ref = "androidx-multidex" }
-annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
-desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
-
-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" }
-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" }
-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activity-compose" }
-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
-ui = { group = "androidx.compose.ui", name = "ui" }
-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
-material3 = { group = "androidx.compose.material3", name = "material3" }
-
-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
-
-material = { group = "com.google.android.material", name = "material", version.ref = "material" }
-fragment = { group = "androidx.fragment", name = "fragment", version.ref = "fragment" }
-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preference-ktx" }
-
-kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines-core" }
-kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
-
-lifecycle = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
-lifecycle-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
-lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycle-extensions" }
-
-hilt = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
-hilt-viewmodel = { group = "com.google.dagger", name = "hilt-lifecycle-viewmodel", version.ref = "hilt" }
-hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" }
-
-room = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
-
-retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "logging-interceptor" }
-gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
-
-glide = { group = "com.github.bumptech.glide", name = "glide", version.ref = "glide" }
-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glide-ksp" }
-
-firebase = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" }
-analytics = { group = "com.google.firebase", name = "firebase-analytics-ktx" }
-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics-ktx" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
+androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
+androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
+androidx-ui = { group = "androidx.compose.ui", name = "ui" }
+androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
+androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
+androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
+androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
+androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
+androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
[plugins]
-com-android-application = { id = "com.android.application", version.ref = "agp" }
-com-android-library = { id = "com.android.library", version.ref = "agp" }
+android-application = { id = "com.android.application", version.ref = "agp" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
-com-google-dagger-hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
-com-google-devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
-
-org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "org-jetbrains-kotlin-android" }
-org-jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "core-ktx" }
-
-com-google-gms-google-services = { id = "com.google.gms.google-services", version.ref = "google-services" }
-com-google-firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "crashlytics" }
-
-[bundles]
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index a4b76b9..e708b1c 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index e2847c8..e59c886 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
+#Tue Mar 11 00:36:37 EDT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
-networkTimeout=10000
-validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index f5feea6..4f906e0 100755
--- a/gradlew
+++ b/gradlew
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/usr/bin/env sh
#
-# Copyright © 2015-2021 the original authors.
+# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,104 +15,69 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# SPDX-License-Identifier: Apache-2.0
-#
##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
+##
+## Gradle start up script for UN*X
+##
##############################################################################
# Attempt to set APP_HOME
-
# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
-# This is normally unused
-# shellcheck disable=SC2034
-APP_BASE_NAME=${0##*/}
-# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
-' "$PWD" ) || exit
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
+MAX_FD="maximum"
warn () {
echo "$*"
-} >&2
+}
die () {
echo
echo "$*"
echo
exit 1
-} >&2
+}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -122,9 +87,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
+ JAVACMD="$JAVA_HOME/jre/sh/java"
else
- JAVACMD=$JAVA_HOME/bin/java
+ JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -133,120 +98,88 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD=java
- if ! command -v java >/dev/null 2>&1
- then
- die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
- fi
fi
# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC2039,SC3045
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC2039,SC3045
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
fi
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=$( cygpath --unix "$JAVACMD" )
+ JAVACMD=`cygpath --unix "$JAVACMD"`
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
fi
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Collect all arguments for the java command:
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
-# and any embedded shellness will be escaped.
-# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
-# treated as '${Hostname}' itself on the command line.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Stop when "xargs" is not available.
-if ! command -v xargs >/dev/null 2>&1
-then
- die "xargs is not available"
-fi
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index 9b42019..ac1b06f 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,10 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
-@rem SPDX-License-Identifier: Apache-2.0
-@rem
-@if "%DEBUG%"=="" @echo off
+@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -27,8 +25,7 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
+if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -43,13 +40,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if %ERRORLEVEL% equ 0 goto execute
+if "%ERRORLEVEL%" == "0" goto execute
-echo. 1>&2
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
-echo. 1>&2
-echo Please set the JAVA_HOME variable in your environment to match the 1>&2
-echo location of your Java installation. 1>&2
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
goto fail
@@ -59,11 +56,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo. 1>&2
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
-echo. 1>&2
-echo Please set the JAVA_HOME variable in your environment to match the 1>&2
-echo location of your Java installation. 1>&2
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
goto fail
@@ -78,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
+if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index 2441406..0000000
--- a/settings.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-pluginManagement {
- repositories {
- google()
- mavenCentral()
- gradlePluginPortal()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-rootProject.name = "jetpack-compose-template"
-include ':app'
diff --git a/settings.gradle.kts b/settings.gradle.kts
new file mode 100644
index 0000000..2ea9a42
--- /dev/null
+++ b/settings.gradle.kts
@@ -0,0 +1,23 @@
+pluginManagement {
+ repositories {
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.name = "Gyromin"
+include(":app")