├── PokemonJetpackCompose
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── themes.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.webp
│ │ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.webp
│ │ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.webp
│ │ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.webp
│ │ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.webp
│ │ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── xml
│ │ │ │ │ ├── backup_rules.xml
│ │ │ │ │ └── data_extraction_rules.xml
│ │ │ │ ├── drawable-v24
│ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ └── drawable
│ │ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── mouredev
│ │ │ │ │ └── pokemonjetpackcompose
│ │ │ │ │ ├── ui
│ │ │ │ │ ├── theme
│ │ │ │ │ │ ├── Color.kt
│ │ │ │ │ │ ├── Shape.kt
│ │ │ │ │ │ ├── Type.kt
│ │ │ │ │ │ └── Theme.kt
│ │ │ │ │ └── list
│ │ │ │ │ │ ├── PokemonListViewModel.kt
│ │ │ │ │ │ ├── PokemonCell.kt
│ │ │ │ │ │ └── PokemonListActivity.kt
│ │ │ │ │ ├── model
│ │ │ │ │ └── Pokemon.kt
│ │ │ │ │ └── api
│ │ │ │ │ └── PokemonAPI.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── mouredev
│ │ │ │ └── pokemonjetpackcompose
│ │ │ │ └── ExampleUnitTest.kt
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── mouredev
│ │ │ └── pokemonjetpackcompose
│ │ │ └── ExampleInstrumentedTest.kt
│ ├── proguard-rules.pro
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── settings.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── preview.png
├── README.md
└── .gitignore
/PokemonJetpackCompose/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/preview.png
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PokemonJetpackCompose
3 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @android:color/darker_gray
4 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mouredev/Pokemon-JetpackCompose/HEAD/PokemonJetpackCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val LightGray = Color.LightGray
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Oct 28 22:03:55 CEST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | compose_ui_version = '1.3.3'
4 | }
5 | }// Top-level build file where you can add configuration options common to all sub-projects/modules.
6 | plugins {
7 | id 'com.android.application' version '7.3.1' apply false
8 | id 'com.android.library' version '7.3.1' apply false
9 | id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
10 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "PokemonJetpackCompose"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.theme
2 |
3 | import androidx.compose.foundation.shape.RoundedCornerShape
4 | import androidx.compose.material.Shapes
5 | import androidx.compose.ui.unit.dp
6 |
7 | val Shapes = Shapes(
8 | small = RoundedCornerShape(4.dp),
9 | medium = RoundedCornerShape(4.dp),
10 | large = RoundedCornerShape(0.dp)
11 | )
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/test/java/com/mouredev/pokemonjetpackcompose/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/model/Pokemon.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.model
2 |
3 | /**
4 | * Created by MoureDev by Brais Moure on 28/10/22.
5 | * www.mouredev.com
6 | */
7 |
8 | data class PokemonList(val results: List)
9 |
10 | data class Pokemon(val name: String, val url: String) {
11 |
12 | val id: Int
13 | get() {
14 | val components = url.split("/")
15 | return components[components.size - 2].toIntOrNull() ?: 0
16 | }
17 |
18 | val imageUrl: String
19 | get() = "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/$id.png"
20 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/androidTest/java/com/mouredev/pokemonjetpackcompose/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.mouredev.pokemonjetpackcompose", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/list/PokemonListViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.list
2 |
3 | import androidx.compose.runtime.mutableStateOf
4 | import androidx.compose.runtime.getValue
5 | import androidx.compose.runtime.setValue
6 | import androidx.lifecycle.ViewModel
7 | import com.mouredev.pokemonjetpackcompose.api.PokemonAPI
8 | import com.mouredev.pokemonjetpackcompose.model.Pokemon
9 |
10 | /**
11 | * Created by MoureDev by Brais Moure on 28/10/22.
12 | * www.mouredev.com
13 | */
14 | class PokemonListViewModel: ViewModel() {
15 |
16 | var pokemonList: List by mutableStateOf(listOf())
17 |
18 | init {
19 | loadData()
20 | }
21 |
22 | private fun loadData() {
23 |
24 | PokemonAPI.loadPokemon({ pokemon ->
25 | pokemonList = pokemon
26 | }, {
27 | println("Error")
28 | })
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.theme
2 |
3 | import androidx.compose.material.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 | // Set of Material typography styles to start with
10 | val Typography = Typography(
11 | body1 = TextStyle(
12 | fontFamily = FontFamily.Default,
13 | fontWeight = FontWeight.Normal,
14 | fontSize = 16.sp
15 | )
16 | /* Other default text styles to override
17 | button = TextStyle(
18 | fontFamily = FontFamily.Default,
19 | fontWeight = FontWeight.W500,
20 | fontSize = 14.sp
21 | ),
22 | caption = TextStyle(
23 | fontFamily = FontFamily.Default,
24 | fontWeight = FontWeight.Normal,
25 | fontSize = 12.sp
26 | )
27 | */
28 | )
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/theme/Theme.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.theme
2 |
3 | import androidx.compose.foundation.isSystemInDarkTheme
4 | import androidx.compose.material.MaterialTheme
5 | import androidx.compose.material.darkColors
6 | import androidx.compose.material.lightColors
7 | import androidx.compose.runtime.Composable
8 |
9 | private val DarkColorPalette = darkColors(
10 | primary = LightGray
11 | )
12 |
13 | private val LightColorPalette = lightColors(
14 | primary = LightGray
15 |
16 | /* Other default colors to override
17 | background = Color.White,
18 | surface = Color.White,
19 | onPrimary = Color.White,
20 | onSecondary = Color.Black,
21 | onBackground = Color.Black,
22 | onSurface = Color.Black,
23 | */
24 | )
25 |
26 | @Composable
27 | fun PokemonJetpackComposeTheme(
28 | darkTheme: Boolean = isSystemInDarkTheme(),
29 | content: @Composable () -> Unit
30 | ) {
31 | val colors = if (darkTheme) {
32 | DarkColorPalette
33 | } else {
34 | LightColorPalette
35 | }
36 |
37 | MaterialTheme(
38 | colors = colors,
39 | typography = Typography,
40 | shapes = Shapes,
41 | content = content
42 | )
43 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/api/PokemonAPI.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.api
2 |
3 | import com.mouredev.pokemonjetpackcompose.model.Pokemon
4 | import com.mouredev.pokemonjetpackcompose.model.PokemonList
5 | import retrofit2.Call
6 | import retrofit2.Callback
7 | import retrofit2.Response
8 | import retrofit2.Retrofit
9 | import retrofit2.converter.gson.GsonConverterFactory
10 | import retrofit2.http.GET
11 |
12 | /**
13 | * Created by MoureDev by Brais Moure on 28/10/22.
14 | * www.mouredev.com
15 | */
16 | object PokemonAPI {
17 |
18 | interface PokemonAPI {
19 |
20 | @GET("pokemon?limit=151")
21 | fun loadPokemon(): Call
22 |
23 | }
24 |
25 | fun loadPokemon(success: (pokemonList: List) -> Unit, failure: () -> Unit) {
26 |
27 | val retrofit = Retrofit.Builder().baseUrl("https://pokeapi.co/api/v2/")
28 | .addConverterFactory(GsonConverterFactory.create()).build()
29 | val service = retrofit.create(PokemonAPI::class.java)
30 |
31 | service.loadPokemon().enqueue(object: Callback {
32 |
33 | override fun onResponse(call: Call, response: Response) {
34 | success(response.body()?.results ?: listOf())
35 | }
36 |
37 | override fun onFailure(call: Call, t: Throwable) {
38 | failure()
39 | }
40 |
41 | })
42 | }
43 |
44 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/list/PokemonCell.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.list
2 |
3 | import androidx.compose.foundation.background
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.foundation.shape.CircleShape
6 | import androidx.compose.material.MaterialTheme
7 | import androidx.compose.material.Text
8 | import androidx.compose.runtime.Composable
9 | import androidx.compose.ui.Alignment
10 | import androidx.compose.ui.Modifier
11 | import androidx.compose.ui.draw.clip
12 | import androidx.compose.ui.graphics.Color
13 | import androidx.compose.ui.text.font.FontWeight
14 | import androidx.compose.ui.unit.dp
15 | import coil.compose.AsyncImage
16 | import com.mouredev.pokemonjetpackcompose.model.Pokemon
17 |
18 | /**
19 | * Created by MoureDev by Brais Moure on 28/10/22.
20 | * www.mouredev.com
21 | */
22 |
23 | @Composable
24 | fun PokemonCell(pokemon: Pokemon) {
25 |
26 | Row(
27 | verticalAlignment = Alignment.CenterVertically,
28 | modifier = Modifier.padding(8.dp)
29 | ) {
30 | AsyncImage(
31 | model = pokemon.imageUrl,
32 | "Pokémon image",
33 | modifier = Modifier
34 | .size(60.dp)
35 | .clip(CircleShape)
36 | .background(Color.Gray.copy(alpha = 0.1f))
37 | .padding(8.dp)
38 | )
39 | Text(
40 | "#${pokemon.id}",
41 | style = MaterialTheme.typography.h6,
42 | fontWeight = FontWeight.Light,
43 | modifier = Modifier.padding(4.dp)
44 | )
45 | Text(
46 | pokemon.name.replaceFirstChar { it.uppercase() },
47 | style = MaterialTheme.typography.h5,
48 | fontWeight = FontWeight.Medium
49 | )
50 | Spacer(modifier = Modifier.fillMaxWidth())
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/java/com/mouredev/pokemonjetpackcompose/ui/list/PokemonListActivity.kt:
--------------------------------------------------------------------------------
1 | package com.mouredev.pokemonjetpackcompose.ui.list
2 |
3 | import android.os.Bundle
4 | import androidx.activity.ComponentActivity
5 | import androidx.activity.compose.setContent
6 | import androidx.compose.foundation.layout.fillMaxSize
7 | import androidx.compose.foundation.layout.padding
8 | import androidx.compose.foundation.lazy.LazyColumn
9 | import androidx.compose.foundation.lazy.items
10 | import androidx.compose.material.*
11 | import androidx.compose.runtime.Composable
12 | import androidx.compose.ui.Modifier
13 | import androidx.compose.ui.tooling.preview.Preview
14 | import com.mouredev.pokemonjetpackcompose.ui.theme.PokemonJetpackComposeTheme
15 |
16 | /**
17 | * Created by MoureDev by Brais Moure on 28/10/22.
18 | * www.mouredev.com
19 | */
20 |
21 | class PokemonListActivity : ComponentActivity() {
22 | override fun onCreate(savedInstanceState: Bundle?) {
23 | super.onCreate(savedInstanceState)
24 | setContent {
25 | PokemonJetpackComposeTheme {
26 | Surface(
27 | modifier = Modifier.fillMaxSize(),
28 | color = MaterialTheme.colors.background
29 | ) {
30 | PokemonList()
31 | }
32 | }
33 | }
34 | }
35 | }
36 |
37 | @Composable
38 | fun PokemonList() {
39 |
40 | val viewModel = PokemonListViewModel()
41 |
42 | Scaffold(
43 | topBar = {
44 | TopAppBar(
45 | title = {
46 | Text("Pokémon list")
47 | }
48 | )
49 | }
50 | ) { padding ->
51 | LazyColumn(
52 | modifier = Modifier.padding(padding)
53 | ) {
54 | items(viewModel.pokemonList) { pokemon ->
55 | PokemonCell(pokemon)
56 | }
57 | }
58 | }
59 |
60 | }
61 |
62 |
63 | @Preview(showSystemUi = true)
64 | @Composable
65 | fun PokemonListDefaultPreview() {
66 | PokemonJetpackComposeTheme {
67 | PokemonList()
68 | }
69 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'org.jetbrains.kotlin.android'
4 | }
5 |
6 | android {
7 | namespace 'com.mouredev.pokemonjetpackcompose'
8 | compileSdk 33
9 |
10 | defaultConfig {
11 | applicationId "com.mouredev.pokemonjetpackcompose"
12 | minSdk 23
13 | targetSdk 33
14 | versionCode 1
15 | versionName "1.0"
16 |
17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18 | vectorDrawables {
19 | useSupportLibrary true
20 | }
21 | }
22 |
23 | buildTypes {
24 | release {
25 | minifyEnabled false
26 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
27 | }
28 | }
29 | compileOptions {
30 | sourceCompatibility JavaVersion.VERSION_1_8
31 | targetCompatibility JavaVersion.VERSION_1_8
32 | }
33 | kotlinOptions {
34 | jvmTarget = '1.8'
35 | }
36 | buildFeatures {
37 | compose true
38 | }
39 | composeOptions {
40 | kotlinCompilerExtensionVersion '1.1.1'
41 | }
42 | packagingOptions {
43 | resources {
44 | excludes += '/META-INF/{AL2.0,LGPL2.1}'
45 | }
46 | }
47 | }
48 |
49 | dependencies {
50 |
51 | implementation 'androidx.core:core-ktx:1.9.0'
52 | implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
53 | implementation 'androidx.activity:activity-compose:1.6.1'
54 | implementation "androidx.compose.ui:ui:$compose_ui_version"
55 | implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version"
56 | implementation 'androidx.compose.material:material:1.3.1'
57 | implementation "com.squareup.retrofit2:retrofit:2.9.0"
58 | implementation "com.squareup.retrofit2:converter-gson:2.9.0"
59 | implementation "io.coil-kt:coil-compose:2.2.2"
60 | testImplementation 'junit:junit:4.13.2'
61 | androidTestImplementation 'androidx.test.ext:junit:1.1.5'
62 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
63 | androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_ui_version"
64 | debugImplementation "androidx.compose.ui:ui-tooling:$compose_ui_version"
65 | debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_ui_version"
66 | }
--------------------------------------------------------------------------------
/PokemonJetpackCompose/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Pokémon Jetpack Compose
2 | ## Ejemplo de App Android con Kotlin, Jetpack Compose, Retrofit y consumo de la API REST de Pokémon
3 |
4 | [](https://kotlinlang.org)
5 | [](https://developer.android.com/studio)
6 | [](https://www.android.com)
7 |
8 |
9 | * [Jetpack Compose](https://developer.android.com/jetpack/compose)
10 | * [Retrofit](https://github.com/square/retrofit)
11 | * [PokéAPI](https://pokeapi.co)
12 |
13 |
14 |
15 | También tienes versión de esta aplicación en iOS
16 |
17 | [](https://github.com/mouredev/Pokemon-SwiftUI)
18 |
19 | #### Puedes apoyar mi trabajo haciendo "☆ Star" en el repo o nominarme a "GitHub Star". ¡Gracias!
20 |
21 | [](https://stars.github.com/nominate/)
22 |
23 | Si quieres unirte a nuestra comunidad de desarrollo, aprender programación de Apps, mejorar tus habilidades y ayudar a la continuidad del proyecto, puedes encontrarnos en:
24 |
25 | [](https://twitch.tv/mouredev)
26 | [](https://mouredev.com/discord)
27 | [](https://mouredev.com)
28 |
29 |
30 | ##  Hola, mi nombre es Brais Moure.
31 | ### Freelance full-stack iOS & Android engineer
32 |
33 | [](https://youtube.com/mouredevapps?sub_confirmation=1)
34 | [](https://twitch.com/mouredev)
35 | [](https://mouredev.com/discord)
36 | [](https://twitter.com/mouredev)
37 | 
38 |
39 | Soy ingeniero de software desde hace más de 12 años. Desde hace 4 años combino mi trabajo desarrollando Apps con creación de contenido formativo sobre programación y tecnología en diferentes redes sociales como **[@mouredev](https://moure.dev)**.
40 |
41 | ### En mi perfil de GitHub tienes más información
42 |
43 | [](https://github.com/mouredev)
--------------------------------------------------------------------------------
/PokemonJetpackCompose/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/PokemonJetpackCompose/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio,kotlin,jetbrains,gradle
2 | # Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio,kotlin,jetbrains,gradle
3 |
4 | ### Android ###
5 | # Gradle files
6 | .gradle/
7 | build/
8 |
9 | # Local configuration file (sdk path, etc)
10 | local.properties
11 |
12 | # Log/OS Files
13 | *.log
14 |
15 | # Android Studio generated files and folders
16 | captures/
17 | .externalNativeBuild/
18 | .cxx/
19 | *.apk
20 | output.json
21 |
22 | # IntelliJ
23 | *.iml
24 | .idea/
25 | misc.xml
26 | deploymentTargetDropDown.xml
27 | render.experimental.xml
28 |
29 | # Keystore files
30 | *.jks
31 | *.keystore
32 |
33 | # Google Services (e.g. APIs or Firebase)
34 | google-services.json
35 |
36 | # Android Profiling
37 | *.hprof
38 |
39 | ### Android Patch ###
40 | gen-external-apklibs
41 |
42 | # Replacement of .externalNativeBuild directories introduced
43 | # with Android Studio 3.5.
44 |
45 | ### JetBrains ###
46 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
47 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
48 |
49 | # User-specific stuff
50 | .idea/**/workspace.xml
51 | .idea/**/tasks.xml
52 | .idea/**/usage.statistics.xml
53 | .idea/**/dictionaries
54 | .idea/**/shelf
55 |
56 | # AWS User-specific
57 | .idea/**/aws.xml
58 |
59 | # Generated files
60 | .idea/**/contentModel.xml
61 |
62 | # Sensitive or high-churn files
63 | .idea/**/dataSources/
64 | .idea/**/dataSources.ids
65 | .idea/**/dataSources.local.xml
66 | .idea/**/sqlDataSources.xml
67 | .idea/**/dynamic.xml
68 | .idea/**/uiDesigner.xml
69 | .idea/**/dbnavigator.xml
70 |
71 | # Gradle
72 | .idea/**/gradle.xml
73 | .idea/**/libraries
74 |
75 | # Gradle and Maven with auto-import
76 | # When using Gradle or Maven with auto-import, you should exclude module files,
77 | # since they will be recreated, and may cause churn. Uncomment if using
78 | # auto-import.
79 | # .idea/artifacts
80 | # .idea/compiler.xml
81 | # .idea/jarRepositories.xml
82 | # .idea/modules.xml
83 | # .idea/*.iml
84 | # .idea/modules
85 | # *.iml
86 | # *.ipr
87 |
88 | # CMake
89 | cmake-build-*/
90 |
91 | # Mongo Explorer plugin
92 | .idea/**/mongoSettings.xml
93 |
94 | # File-based project format
95 | *.iws
96 |
97 | # IntelliJ
98 | out/
99 |
100 | # mpeltonen/sbt-idea plugin
101 | .idea_modules/
102 |
103 | # JIRA plugin
104 | atlassian-ide-plugin.xml
105 |
106 | # Cursive Clojure plugin
107 | .idea/replstate.xml
108 |
109 | # SonarLint plugin
110 | .idea/sonarlint/
111 |
112 | # Crashlytics plugin (for Android Studio and IntelliJ)
113 | com_crashlytics_export_strings.xml
114 | crashlytics.properties
115 | crashlytics-build.properties
116 | fabric.properties
117 |
118 | # Editor-based Rest Client
119 | .idea/httpRequests
120 |
121 | # Android studio 3.1+ serialized cache file
122 | .idea/caches/build_file_checksums.ser
123 |
124 | ### JetBrains Patch ###
125 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
126 |
127 | # *.iml
128 | # modules.xml
129 | # .idea/misc.xml
130 | # *.ipr
131 |
132 | # Sonarlint plugin
133 | # https://plugins.jetbrains.com/plugin/7973-sonarlint
134 | .idea/**/sonarlint/
135 |
136 | # SonarQube Plugin
137 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
138 | .idea/**/sonarIssues.xml
139 |
140 | # Markdown Navigator plugin
141 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
142 | .idea/**/markdown-navigator.xml
143 | .idea/**/markdown-navigator-enh.xml
144 | .idea/**/markdown-navigator/
145 |
146 | # Cache file creation bug
147 | # See https://youtrack.jetbrains.com/issue/JBR-2257
148 | .idea/$CACHE_FILE$
149 |
150 | # CodeStream plugin
151 | # https://plugins.jetbrains.com/plugin/12206-codestream
152 | .idea/codestream.xml
153 |
154 | # Azure Toolkit for IntelliJ plugin
155 | # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
156 | .idea/**/azureSettings.xml
157 |
158 | ### Kotlin ###
159 | # Compiled class file
160 | *.class
161 |
162 | # Log file
163 |
164 | # BlueJ files
165 | *.ctxt
166 |
167 | # Mobile Tools for Java (J2ME)
168 | .mtj.tmp/
169 |
170 | # Package Files #
171 | *.jar
172 | *.war
173 | *.nar
174 | *.ear
175 | *.zip
176 | *.tar.gz
177 | *.rar
178 |
179 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
180 | hs_err_pid*
181 | replay_pid*
182 |
183 | ### Gradle ###
184 | .gradle
185 | **/build/
186 | !src/**/build/
187 |
188 | # Ignore Gradle GUI config
189 | gradle-app.setting
190 |
191 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
192 | !gradle-wrapper.jar
193 |
194 | # Avoid ignore Gradle wrappper properties
195 | !gradle-wrapper.properties
196 |
197 | # Cache of project
198 | .gradletasknamecache
199 |
200 | # Eclipse Gradle plugin generated files
201 | # Eclipse Core
202 | .project
203 | # JDT-specific (Eclipse Java Development Tools)
204 | .classpath
205 |
206 | ### Gradle Patch ###
207 | # Java heap dump
208 |
209 | ### AndroidStudio ###
210 | # Covers files to be ignored for android development using Android Studio.
211 |
212 | # Built application files
213 | *.ap_
214 | *.aab
215 |
216 | # Files for the ART/Dalvik VM
217 | *.dex
218 |
219 | # Java class files
220 |
221 | # Generated files
222 | bin/
223 | gen/
224 |
225 | # Gradle files
226 |
227 | # Signing files
228 | .signing/
229 |
230 | # Local configuration file (sdk path, etc)
231 |
232 | # Proguard folder generated by Eclipse
233 | proguard/
234 |
235 | # Log Files
236 |
237 | # Android Studio
238 | /*/build/
239 | /*/local.properties
240 | /*/out
241 | /*/*/build
242 | /*/*/production
243 | .navigation/
244 | *.ipr
245 | *~
246 | *.swp
247 |
248 | # Keystore files
249 |
250 | # Google Services (e.g. APIs or Firebase)
251 | # google-services.json
252 |
253 | # Android Patch
254 |
255 | # External native build folder generated in Android Studio 2.2 and later
256 | .externalNativeBuild
257 |
258 | # NDK
259 | obj/
260 |
261 | # IntelliJ IDEA
262 | /out/
263 |
264 | # User-specific configurations
265 | .idea/caches/
266 | .idea/libraries/
267 | .idea/shelf/
268 | .idea/workspace.xml
269 | .idea/tasks.xml
270 | .idea/.name
271 | .idea/compiler.xml
272 | .idea/copyright/profiles_settings.xml
273 | .idea/encodings.xml
274 | .idea/misc.xml
275 | .idea/modules.xml
276 | .idea/scopes/scope_settings.xml
277 | .idea/dictionaries
278 | .idea/vcs.xml
279 | .idea/jsLibraryMappings.xml
280 | .idea/datasources.xml
281 | .idea/dataSources.ids
282 | .idea/sqlDataSources.xml
283 | .idea/dynamic.xml
284 | .idea/uiDesigner.xml
285 | .idea/assetWizardSettings.xml
286 | .idea/gradle.xml
287 | .idea/jarRepositories.xml
288 | .idea/navEditor.xml
289 |
290 | # Legacy Eclipse project files
291 | .cproject
292 | .settings/
293 |
294 | # Mobile Tools for Java (J2ME)
295 |
296 | # Package Files #
297 |
298 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
299 |
300 | ## Plugin-specific files:
301 |
302 | # mpeltonen/sbt-idea plugin
303 |
304 | # JIRA plugin
305 |
306 | # Mongo Explorer plugin
307 | .idea/mongoSettings.xml
308 |
309 | # Crashlytics plugin (for Android Studio and IntelliJ)
310 |
311 | ### AndroidStudio Patch ###
312 |
313 | !/gradle/wrapper/gradle-wrapper.jar
314 |
315 | # End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,kotlin,jetbrains,gradle
--------------------------------------------------------------------------------