Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Fix several project lint report warnings #498

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
lintOptions {
disable 'GoogleAppIndexingWarning'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't prefer to ignore GoogleAppIndexingWarning, the purpose of sunflower project is a demo for different Android features of jetpack or androidX, the GoogleAppIndexingWarning can be one part of them.

Let the warning there is OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intension was to force warnings as errors by warningsAsErrors attribute, with that all changes has verify by CI on PR forcing to failure if was introduces new lint warnings (forcing contributors to check them). That was the only reason for why I added the disable 'GoogleAppIndexWarning'.

If you consider that isn't necessary I remove that also. Please confirm me, for make these changes on PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @tiembo

disable 'IconLauncherShape'
warningsAsErrors true
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class PlantDetailFragment : Fragment() {
getString(R.string.share_text_plant, plant.name)
}
}
val shareIntent = ShareCompat.IntentBuilder.from(activity)
ShareCompat.IntentBuilder.from(requireActivity())
.setText(shareText)
.setType("text/plain")
.createChooserIntent()
Expand All @@ -136,8 +136,7 @@ class PlantDetailFragment : Fragment() {
// Else, we will use the old CLEAR_WHEN_TASK_RESET flag
addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET)
}
}
startActivity(shareIntent)
}.also { startActivity(it) }
}

// FloatingActionButtons anchored to AppBarLayouts have their visibility controlled by the scroll position.
Expand Down
129 changes: 0 additions & 129 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ buildscript {
targetSdkVersion = 28

// App dependencies
appCompatVersion = '1.1.0-beta01'
constraintLayoutVersion = '2.0.0-beta1'
appCompatVersion = '1.1.0-rc01'
constraintLayoutVersion = '2.0.0-beta2'
coreTestingVersion = '2.0.0'
coroutinesVersion = "1.3.0-M2"
espressoVersion = '3.1.1'
fragmentVersion = '1.1.0-alpha09'
fragmentVersion = '1.2.0-alpha02'
glideVersion = '4.9.0'
gradleVersion = '3.5.0'
gsonVersion = '2.8.2'
junitVersion = '4.12'
kotlinVersion = '1.3.41'
ktlintVersion = '0.33.0'
ktxVersion = '1.0.2'
lifecycleVersion = '2.2.0-alpha01'
ktxVersion = '1.2.0-alpha03'
lifecycleVersion = '2.2.0-alpha03'
materialVersion = '1.1.0-alpha09'
navigationVersion = '2.0.0'
recyclerViewVersion = '1.1.0-alpha05'
recyclerViewVersion = '1.1.0-beta03'
roomVersion = '2.1.0'
runnerVersion = '1.0.1'
truthVersion = '0.42'
testExtJunit = '1.1.0'
uiAutomatorVersion = '2.2.0'
viewPagerVersion = '1.0.0-beta03'
workVersion = '2.1.0'
workVersion = '2.2.0'
}

repositories {
Expand Down