Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: buff v2 with new gradle ver and other minor fixes, ready for v3 #34

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
1 change: 1 addition & 0 deletions .idea/.name

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

2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

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

48 changes: 48 additions & 0 deletions .idea/emulatorDisplays.xml

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

6 changes: 3 additions & 3 deletions .idea/gradle.xml

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

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

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

10 changes: 10 additions & 0 deletions .idea/migrations.xml

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

3 changes: 2 additions & 1 deletion .idea/misc.xml

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

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

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

58 changes: 30 additions & 28 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@ def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
compileSdk 33
buildToolsVersion "30.0.3"
// signingConfigs {
// release {
// keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword']
// storeFile file(keystoreProperties['storeFile'])
// storePassword keystoreProperties['storePassword']
// }
// }
compileSdk 35
// buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.dscvit.vitty"
namespace "com.dscvit.vitty"
minSdkVersion 24
//noinspection OldTargetApi
targetSdkVersion 33
versionCode 37
versionName "2.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
// signingConfig signingConfigs.release
}

buildTypes {
Expand All @@ -50,39 +51,40 @@ android {
buildFeatures {
viewBinding true
dataBinding true
buildConfig true
}
}

dependencies {

// Android Stuff
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.7'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.8.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.8.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

// Firebase
implementation platform('com.google.firebase:firebase-bom:27.1.0')
implementation platform('com.google.firebase:firebase-bom:33.7.0')
implementation 'com.google.firebase:firebase-analytics-ktx'

// Firebase Auth
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.google.android.gms:play-services-auth:21.3.0'

// Firestore
implementation 'com.google.firebase:firebase-firestore:24.2.0'
implementation 'com.google.firebase:firebase-firestore:25.1.1'

// FCM
implementation 'com.google.firebase:firebase-messaging:23.0.6'
implementation 'com.google.firebase:firebase-messaging:24.1.0'

// Remote Config
implementation 'com.google.firebase:firebase-config-ktx'
Expand All @@ -104,5 +106,5 @@ dependencies {
// Timber for logs
implementation 'com.jakewharton.timber:timber:4.7.1'

implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.12.0'
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/dscvit/vitty/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class App : Application() {

private val defaultConfig: HashMap<String, Any> =
hashMapOf(
LATEST_VERSION to BuildConfig.VERSION_CODE,
LATEST_VERSION to BuildConfig.VERSION_NAME,
ONLINE_MODE to false
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AddInfoActivity : AppCompatActivity() {
}

authViewModel.user.observe(this) {
Timber.d("User: ${it}")
Timber.d("User: $it")
if (it != null) {

val timetableDays = it.timetable?.data
Expand Down Expand Up @@ -109,7 +109,7 @@ class AddInfoActivity : AppCompatActivity() {
})

authViewModel.usernameValidity.observe(this) {
Timber.d("Validity: ${it}")
Timber.d("Validity: $it")
if (it != null) {
binding.usernameValidity.visibility = View.VISIBLE
binding.usernameValidity.text = it.detail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class AuthActivity : AppCompatActivity() {

authViewModel.signInResponse.observe(this) {
if (it != null) {
Timber.d("here--" + it.toString())
Timber.d("here--$it")
sharedPref.edit().putString(Constants.COMMUNITY_USERNAME, it.username).apply()
sharedPref.edit().putString(Constants.COMMUNITY_TOKEN, it.token).apply()
sharedPref.edit().putString(Constants.COMMUNITY_NAME, it.name).apply()
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/dscvit/vitty/adapter/DayAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.dscvit.vitty.ui.schedule.DayFragment
import timber.log.Timber

class DayAdapter(fa: Fragment, private val username: String?, private val isFriendsTimetable: Boolean = false) : FragmentStateAdapter(fa) {
private val numPages = 7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dscvit.vitty.adapter

import android.annotation.SuppressLint
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
Expand All @@ -26,7 +27,7 @@ class SearchAdapter(
) :
RecyclerView.Adapter<SearchAdapter.ViewHolder>() {

val mutableDataSet = dataSet.toMutableList()
private val mutableDataSet = dataSet.toMutableList()

class ViewHolder(private val binding: CardRequestBinding) :
RecyclerView.ViewHolder(binding.root) {
Expand Down Expand Up @@ -56,6 +57,7 @@ class SearchAdapter(
)
}

@SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val item = mutableDataSet[holder.adapterPosition]
holder.bind(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class APICommunityRestClient {
}

private var mApiUser: APICommunity? = null
val retrofit = CommunityNetworkClient.retrofitClientCommunity
private val retrofit = CommunityNetworkClient.retrofitClientCommunity


fun signInWithUsernameRegNo(
Expand All @@ -33,7 +33,7 @@ class APICommunityRestClient {
retrofitSelfUserListener: RetrofitSelfUserListener
) {

mApiUser = retrofit.create<APICommunity>(APICommunity::class.java)
mApiUser = retrofit.create(APICommunity::class.java)


val requestBody = AuthRequestBody(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.dscvit.vitty.network.api.community


import com.dscvit.vitty.util.APIConstants.Community_BASE_URL
import com.dscvit.vitty.util.APIConstants.COMMUNITY_BASE_URL
import com.dscvit.vitty.util.APIConstants.TIMEOUT
import okhttp3.OkHttpClient
import retrofit2.Retrofit
Expand All @@ -10,15 +10,15 @@ import java.util.concurrent.TimeUnit

object CommunityNetworkClient {

var retrofit: Retrofit? = null
private var retrofit: Retrofit? = null

val retrofitClientCommunity: Retrofit
get() {
if (retrofit == null) {
val okHttpClientBuilder = OkHttpClient.Builder()
okHttpClientBuilder.connectTimeout(TIMEOUT.toLong(), TimeUnit.SECONDS)
retrofit = Retrofit.Builder()
.baseUrl(Community_BASE_URL)
.baseUrl(COMMUNITY_BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.client(okHttpClientBuilder.build())
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.util.concurrent.TimeUnit

object NetworkClient {

var retrofit: Retrofit? = null
private var retrofit: Retrofit? = null

val retrofitClient: Retrofit
get() {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/dscvit/vitty/util/VITMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.widget.Toast

object VITMap {
private const val VIT = "Vellore+Institute+of+Technology,+Vellore+India" // done
val blocks: HashMap<String, String> = HashMap()
private val blocks: HashMap<String, String> = HashMap()

init {
blocks["CDMM"] = "Centre+For+Disaster+Mitigation+And+Management,+$VIT"
Expand Down Expand Up @@ -38,7 +38,7 @@ object VITMap {
mapIntent.setPackage("com.google.android.apps.maps")
try {
Analytics.navigation(classBlock)
} catch (e: Exception) {
} catch (_: Exception) {
}
mapIntent.resolveActivity(context.packageManager)?.let {
context.startActivity(mapIntent)
Expand Down
Loading
Loading