Updated Spotless
This commit is contained in:
parent
defcd86152
commit
4b767bca54
4 changed files with 7 additions and 20 deletions
|
@ -24,7 +24,7 @@ import org.koin.core.parameter.parametersOf
|
||||||
|
|
||||||
class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail) {
|
class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail) {
|
||||||
private val arguments by navArgs<PlaylistDetailsFragmentArgs>()
|
private val arguments by navArgs<PlaylistDetailsFragmentArgs>()
|
||||||
private val viewModel: PlaylistDetailsViewModel by viewModel {
|
private val viewModel by viewModel<PlaylistDetailsViewModel> {
|
||||||
parametersOf(arguments.extraPlaylist)
|
parametersOf(arguments.extraPlaylist)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli
|
||||||
emptyText.isVisible = playlistSongAdapter.itemCount == 0
|
emptyText.isVisible = playlistSongAdapter.itemCount == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
recyclerView?.itemAnimator = null
|
recyclerView?.itemAnimator = null
|
||||||
recyclerView?.adapter = null
|
recyclerView?.adapter = null
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
app:argType="code.name.monkey.retromusic.model.Genre" />
|
app:argType="code.name.monkey.retromusic.model.Genre" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
<!--<fragment
|
<fragment
|
||||||
android:id="@+id/playlistDetailsFragment"
|
android:id="@+id/playlistDetailsFragment"
|
||||||
android:name="code.name.monkey.retromusic.fragments.playlists.PlaylistDetailsFragment"
|
android:name="code.name.monkey.retromusic.fragments.playlists.PlaylistDetailsFragment"
|
||||||
android:label="PlaylistDetailsFragment"
|
android:label="PlaylistDetailsFragment"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<argument
|
<argument
|
||||||
android:name="extra_playlist"
|
android:name="extra_playlist"
|
||||||
app:argType="code.name.monkey.retromusic.db.PlaylistWithSongs" />
|
app:argType="code.name.monkey.retromusic.db.PlaylistWithSongs" />
|
||||||
</fragment>-->
|
</fragment>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/albumDetailsFragment"
|
android:id="@+id/albumDetailsFragment"
|
||||||
|
|
|
@ -11,7 +11,8 @@ buildscript {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
def nav_version = "2.3.0"
|
def nav_version = "2.3.0"
|
||||||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
||||||
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.27.0"
|
//noinspection GradleDependency
|
||||||
|
classpath "com.diffplug.spotless:spotless-plugin-gradle:4.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,17 @@
|
||||||
apply plugin: "com.diffplug.gradle.spotless"
|
apply plugin: "com.diffplug.gradle.spotless"
|
||||||
spotless {
|
spotless {
|
||||||
java {
|
java {
|
||||||
target "**/*.java"
|
target "src/*.java"
|
||||||
trimTrailingWhitespace()
|
trimTrailingWhitespace()
|
||||||
removeUnusedImports()
|
removeUnusedImports()
|
||||||
googleJavaFormat()
|
googleJavaFormat()
|
||||||
endWithNewline()
|
endWithNewline()
|
||||||
}
|
}
|
||||||
kotlin {
|
kotlin {
|
||||||
target "**/*.kt"
|
target "src/*.kt"
|
||||||
ktlint().userData(['indent_size': '4', 'continuation_indent_size': '2', 'disabled_rules': 'no-wildcard-imports'])
|
ktlint().userData(['indent_size': '4', 'continuation_indent_size': '2', 'disabled_rules': 'no-wildcard-imports'])
|
||||||
licenseHeaderFile '../spotless.license.kt'
|
licenseHeaderFile '../spotless.license.kt'
|
||||||
trimTrailingWhitespace()
|
trimTrailingWhitespace()
|
||||||
endWithNewline()
|
endWithNewline()
|
||||||
}
|
}
|
||||||
format 'misc', {
|
|
||||||
target '**/*.gradle', '**/*.md', '**/.gitignore'
|
|
||||||
indentWithSpaces()
|
|
||||||
trimTrailingWhitespace()
|
|
||||||
endWithNewline()
|
|
||||||
}
|
|
||||||
|
|
||||||
format 'xml', {
|
|
||||||
target '**/*.xml'
|
|
||||||
indentWithSpaces()
|
|
||||||
trimTrailingWhitespace()
|
|
||||||
endWithNewline()
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue