Skip to content

Commit

Permalink
Merge pull request #6 from BorgRancher/dev
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
ZASHMCD authored Jun 5, 2022
2 parents 9f67ea8 + c98e101 commit 6a5eb7e
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 9 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ android {
versionCode 1
versionName "1.0"
buildConfigField("String","BASE_URL","\"https://graphql-pokeapi.graphcdn.app\"")

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

setProperty("archivesBaseName", "connectedex")

javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
Expand All @@ -29,10 +30,22 @@ android {
}
}


signingConfigs {
release {
storeFile file("$projectDir/BorgRanch.p12")
storePassword project.properties['keyStorePass']
keyAlias project.properties['keyAlias']
keyPassword project.properties['keyStorePass']
}
}

buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}

debug {
Expand Down Expand Up @@ -148,7 +161,7 @@ dependencies {
implementation "com.airbnb.android:lottie:$lottie_version"

// Paging 3 for taming pokemon
def paging_version = '3.0.0'
def paging_version = '3.1.1'
implementation "androidx.paging:paging-runtime:$paging_version"

// alternatively - without Android dependencies for tests
Expand Down
12 changes: 11 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,14 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt.Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="tech.borgranch.pokedex">

<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -11,9 +12,11 @@
android:allowBackup="true"
android:icon="@mipmap/pokedex_test"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security"
android:roundIcon="@mipmap/pokedex_test"
android:supportsRtl="true"
android:theme="@style/Theme.Pokedex">
android:theme="@style/Theme.Pokedex"
tools:ignore="UnusedAttribute">
<activity
android:name=".ui.main.MainActivity"
android:exported="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ import tech.borgranch.pokedex.data.dto.PokemonDetail
import tech.borgranch.pokedex.graphql.PokemonQuery
import javax.inject.Inject

/**
* @author Shaun McDonald
* @since 2022-06-01
* @version 1.0.0
* Repository for Pokemon details
*/

class DetailRepository @Inject constructor(
val detailDao: DetailDao,
val pokedexClient: ApolloClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import tech.borgranch.pokedex.data.dto.PokemonItem
import tech.borgranch.pokedex.graphql.PokemonsQuery
import java.io.IOException

/**
* @author Shaun McDonald
* @since 2022-06-01
* @version 0.0.1
* Paging source for getting list of pokemons
*/
class ListPagingSource(
private val pokeDexClient: ApolloClient,
private val itemDao: ListDao
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import javax.inject.Singleton

/**
* @author Shaun McDonald
* @version 1.2
* @version 1.0.0
*
* A single source for all dispatchers in the application,
* neatly avoiding the untestable mess of hardcoded values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import javax.inject.Singleton

/**
* @author Shaun McDonald
* @version 1.2
* @version 1.0.0
* Determines the dependencies for the network module.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import javax.inject.Singleton

/**
* @author Shaun McDonald
* @version 1.2
* @version 1.0.0
* Offline storage for Pokedex implemented in Android Room
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import tech.borgranch.pokedex.data.dao.ListDao
import tech.borgranch.pokedex.data.repositories.DetailRepository
import tech.borgranch.pokedex.data.repositories.ListRepository

/**
* @author Shaun McDonald
* @since 2022-06-01
* @version 1.0.0
* Module providing dependencies for the ViewModels
*/

@Module
@InstallIn(ViewModelComponent::class)
object RepositoryModule {
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/xml/network_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="false">graphql-pokeapi.graphcdn.app</domain>
</domain-config>
</network-security>
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ task clean(type: Delete) {
delete rootProject.buildDir
}



2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ android.nonTransitiveRClass=true
kotlin.code.style=official
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" -Dfile.encoding\=UTF-8 -XX\:+UseParallelGC
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ dependencyResolutionManagement {
}
}



rootProject.name = "Pokedex"
include ':app'

0 comments on commit 6a5eb7e

Please sign in to comment.