Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs"
apply plugin: 'kotlin-parcelize'
apply plugin: 'androidx.navigation.safeargs'

android {
compileSdkVersion 30
compileSdk 33
buildFeatures {
dataBinding true
}
defaultConfig {
applicationId "com.example.android.gdgfinder"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -41,6 +41,14 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
namespace "com.example.android.gdgfinder"
}

dependencies {
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.example.android.gdgfinder">
xmlns:tools="http://schemas.android.com/tools" >

<!-- In order for our app to access the Internet, we need to define this permission. -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- To access the location we need to ask for permission -->
<!-- see https://developer.android.com/training/location/retrieve-current.html -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>


<application
android:usesCleartextTraffic="true"
Expand All @@ -17,14 +17,16 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<activity android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="preloaded_fonts" android:resource="@array/preloaded_fonts"/>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,16 @@ class GdgListFragment : Fragment() {
// Sets the adapter of the RecyclerView
binding.gdgChapterList.adapter = adapter

viewModel.showNeedLocation.observe(viewLifecycleOwner, object: Observer<Boolean> {
override fun onChanged(show: Boolean?) {
viewModel.showNeedLocation.observe(viewLifecycleOwner) { show ->
if (show == true) {
// Snackbar is like Toast but it lets us show forever
if (show == true) {
Snackbar.make(
binding.root,
"No location. Enable location in settings (hint: test with Maps) then check app permissions!",
Snackbar.LENGTH_LONG
).show()
}
Snackbar.make(
binding.root,
"No location. Enable location in settings (hint: test with Maps) then check app permissions!",
Snackbar.LENGTH_LONG
).show()
}
})
}

setHasOptionsMenu(true)
return binding.root
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ buildscript {
// Versions for all the dependencies we plan to use. It's particularly useful for kotlin and
// navigation where the versions of the plugin needs to be the same as the version of the
// library defined in the app Gradle file
version_gradle = "4.0.1"
version_gradle = "8.1.0"
version_core = "1.3.1"
version_kotlin = "1.3.72"
version_kotlin = "1.9.0"
version_kotlin_coroutines = "1.2.1"
version_lifecycle_extensions = "2.2.0"
version_moshi = "1.8.0"
version_navigation = "2.3.0"
version_navigation = "2.5.0"
version_constraint_layout = "2.0.0-rc1"
version_glide = "4.8.0"
version_retrofit = "2.5.0"
Expand All @@ -23,8 +23,8 @@ buildscript {
}

repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$version_gradle"
Expand All @@ -35,8 +35,8 @@ buildscript {

allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}

Expand Down
7 changes: 6 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx1536M \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
# 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
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Aug 11 17:39:48 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Loading