Fix lint warnings

pull/332/head
Koitharu 3 years ago
parent f3a8eb3216
commit f368277d73
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -83,7 +83,7 @@ dependencies {
} }
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.21' implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.21'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.10.0' implementation 'androidx.core:core-ktx:1.10.0'
@ -140,14 +140,14 @@ dependencies {
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
testImplementation 'org.json:json:20230227' testImplementation 'org.json:json:20230227'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4' testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.0'
androidTestImplementation 'androidx.test:runner:1.5.2' androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0' androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test:core-ktx:1.5.0' androidTestImplementation 'androidx.test:core-ktx:1.5.0'
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5' androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4' androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.0'
androidTestImplementation 'androidx.room:room-testing:2.5.1' androidTestImplementation 'androidx.room:room-testing:2.5.1'
androidTestImplementation 'com.squareup.moshi:moshi-kotlin:1.14.0' androidTestImplementation 'com.squareup.moshi:moshi-kotlin:1.14.0'

@ -1,4 +1,5 @@
-optimizationpasses 8 -optimizationpasses 8
-dontobfuscate
-assumenosideeffects class kotlin.jvm.internal.Intrinsics { -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void checkExpressionValueIsNotNull(...); public static void checkExpressionValueIsNotNull(...);
public static void checkNotNullExpressionValue(...); public static void checkNotNullExpressionValue(...);

@ -163,10 +163,6 @@
</activity> </activity>
<service
android:name="org.koitharu.kotatsu.download.ui.service.DownloadService"
android:foregroundServiceType="dataSync"
android:stopWithTask="false" />
<service android:name="org.koitharu.kotatsu.local.ui.LocalChaptersRemoveService" /> <service android:name="org.koitharu.kotatsu.local.ui.LocalChaptersRemoveService" />
<service <service
android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetService" android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetService"
@ -241,7 +237,13 @@
<provider <provider
android:name="androidx.startup.InitializationProvider" android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup" android:authorities="${applicationId}.androidx-startup"
tools:node="remove" /> android:exported="false"
tools:node="remove">
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
<receiver <receiver
android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetProvider" android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetProvider"

@ -10,9 +10,7 @@ import com.google.android.material.floatingactionbutton.ExtendedFloatingActionBu
open class ShrinkOnScrollBehavior : Behavior<ExtendedFloatingActionButton> { open class ShrinkOnScrollBehavior : Behavior<ExtendedFloatingActionButton> {
@Suppress("unused")
constructor() : super() constructor() : super()
@Suppress("unused")
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
override fun onStartNestedScroll( override fun onStartNestedScroll(

@ -1,7 +1,10 @@
package org.koitharu.kotatsu.core.db.entity package org.koitharu.kotatsu.core.db.entity
import org.koitharu.kotatsu.core.model.MangaSource import org.koitharu.kotatsu.core.model.MangaSource
import org.koitharu.kotatsu.parsers.model.* import org.koitharu.kotatsu.parsers.model.Manga
import org.koitharu.kotatsu.parsers.model.MangaState
import org.koitharu.kotatsu.parsers.model.MangaTag
import org.koitharu.kotatsu.parsers.model.SortOrder
import org.koitharu.kotatsu.parsers.util.mapToSet import org.koitharu.kotatsu.parsers.util.mapToSet
import org.koitharu.kotatsu.parsers.util.toTitleCase import org.koitharu.kotatsu.parsers.util.toTitleCase
import org.koitharu.kotatsu.utils.ext.longHashCode import org.koitharu.kotatsu.utils.ext.longHashCode
@ -66,7 +69,6 @@ fun SortOrder(name: String, fallback: SortOrder): SortOrder = runCatching {
SortOrder.valueOf(name) SortOrder.valueOf(name)
}.getOrDefault(fallback) }.getOrDefault(fallback)
@Suppress("FunctionName")
fun MangaState(name: String): MangaState? = runCatching { fun MangaState(name: String): MangaState? = runCatching {
MangaState.valueOf(name) MangaState.valueOf(name)
}.getOrNull() }.getOrNull()

@ -11,6 +11,7 @@ import androidx.annotation.VisibleForTesting
import androidx.core.content.pm.ShortcutInfoCompat import androidx.core.content.pm.ShortcutInfoCompat
import androidx.core.content.pm.ShortcutManagerCompat import androidx.core.content.pm.ShortcutManagerCompat
import androidx.core.graphics.drawable.IconCompat import androidx.core.graphics.drawable.IconCompat
import androidx.core.graphics.drawable.toBitmap
import androidx.room.InvalidationTracker import androidx.room.InvalidationTracker
import coil.ImageLoader import coil.ImageLoader
import coil.request.ImageRequest import coil.request.ImageRequest
@ -27,9 +28,9 @@ import org.koitharu.kotatsu.core.prefs.AppSettings
import org.koitharu.kotatsu.history.domain.HistoryRepository import org.koitharu.kotatsu.history.domain.HistoryRepository
import org.koitharu.kotatsu.parsers.model.Manga import org.koitharu.kotatsu.parsers.model.Manga
import org.koitharu.kotatsu.reader.ui.ReaderActivity import org.koitharu.kotatsu.reader.ui.ReaderActivity
import org.koitharu.kotatsu.utils.ext.getDrawableOrThrow
import org.koitharu.kotatsu.utils.ext.printStackTraceDebug import org.koitharu.kotatsu.utils.ext.printStackTraceDebug
import org.koitharu.kotatsu.utils.ext.processLifecycleScope import org.koitharu.kotatsu.utils.ext.processLifecycleScope
import org.koitharu.kotatsu.utils.ext.requireBitmap
import org.koitharu.kotatsu.utils.ext.runCatchingCancellable import org.koitharu.kotatsu.utils.ext.runCatchingCancellable
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@ -92,6 +93,14 @@ class ShortcutsUpdater @Inject constructor(
return manager.maxShortcutCountPerActivity > 0 return manager.maxShortcutCountPerActivity > 0
} }
fun notifyMangaOpened(mangaId: Long) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1) {
return
}
val manager = context.getSystemService(Context.SHORTCUT_SERVICE) as ShortcutManager
manager.reportShortcutUsed(mangaId.toString())
}
@RequiresApi(Build.VERSION_CODES.N_MR1) @RequiresApi(Build.VERSION_CODES.N_MR1)
private suspend fun updateShortcutsImpl() = runCatchingCancellable { private suspend fun updateShortcutsImpl() = runCatchingCancellable {
val manager = context.getSystemService(Context.SHORTCUT_SERVICE) as ShortcutManager val manager = context.getSystemService(Context.SHORTCUT_SERVICE) as ShortcutManager
@ -122,7 +131,7 @@ class ShortcutsUpdater @Inject constructor(
.precision(Precision.EXACT) .precision(Precision.EXACT)
.scale(Scale.FILL) .scale(Scale.FILL)
.build(), .build(),
).requireBitmap() ).getDrawableOrThrow().toBitmap()
}.fold( }.fold(
onSuccess = { IconCompat.createWithAdaptiveBitmap(it) }, onSuccess = { IconCompat.createWithAdaptiveBitmap(it) },
onFailure = { IconCompat.createWithResource(context, R.drawable.ic_shortcut_default) }, onFailure = { IconCompat.createWithResource(context, R.drawable.ic_shortcut_default) },

@ -1,5 +1,6 @@
package org.koitharu.kotatsu.reader.ui package org.koitharu.kotatsu.reader.ui
import android.annotation.SuppressLint
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
@ -179,6 +180,7 @@ class ReaderInfoBarView @JvmOverloads constructor(
} }
} }
@SuppressLint("DiscouragedApi")
private fun getSystemUiDimensionOffset(name: String, fallback: Int = 0): Int = runCatching { private fun getSystemUiDimensionOffset(name: String, fallback: Int = 0): Int = runCatching {
val manager = context.packageManager val manager = context.packageManager
val resources = manager.getResourcesForApplication("com.android.systemui") val resources = manager.getResourcesForApplication("com.android.systemui")

@ -19,6 +19,8 @@ import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.launchIn
@ -34,6 +36,7 @@ import org.koitharu.kotatsu.base.domain.MangaIntent
import org.koitharu.kotatsu.base.ui.BaseViewModel import org.koitharu.kotatsu.base.ui.BaseViewModel
import org.koitharu.kotatsu.bookmarks.domain.Bookmark import org.koitharu.kotatsu.bookmarks.domain.Bookmark
import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository
import org.koitharu.kotatsu.core.os.ShortcutsUpdater
import org.koitharu.kotatsu.core.parser.MangaRepository import org.koitharu.kotatsu.core.parser.MangaRepository
import org.koitharu.kotatsu.core.prefs.AppSettings import org.koitharu.kotatsu.core.prefs.AppSettings
import org.koitharu.kotatsu.core.prefs.ReaderMode import org.koitharu.kotatsu.core.prefs.ReaderMode
@ -75,6 +78,7 @@ class ReaderViewModel @Inject constructor(
private val pageSaveHelper: PageSaveHelper, private val pageSaveHelper: PageSaveHelper,
private val pageLoader: PageLoader, private val pageLoader: PageLoader,
private val chaptersLoader: ChaptersLoader, private val chaptersLoader: ChaptersLoader,
private val shortcutsUpdater: ShortcutsUpdater,
) : BaseViewModel() { ) : BaseViewModel() {
private val intent = MangaIntent(savedStateHandle) private val intent = MangaIntent(savedStateHandle)
@ -149,6 +153,10 @@ class ReaderViewModel @Inject constructor(
.onEach { key -> .onEach { key ->
if (key == AppSettings.KEY_READER_SLIDER) notifyStateChanged() if (key == AppSettings.KEY_READER_SLIDER) notifyStateChanged()
}.launchIn(viewModelScope + Dispatchers.Default) }.launchIn(viewModelScope + Dispatchers.Default)
launchJob(Dispatchers.Default) {
val mangaId = mangaData.filterNotNull().first().id
shortcutsUpdater.notifyMangaOpened(mangaId)
}
} }
fun reload() { fun reload() {

@ -33,7 +33,9 @@ open class PageHolder(
binding.ssiv.bindToLifecycle(owner) binding.ssiv.bindToLifecycle(owner)
binding.ssiv.isEagerLoadingEnabled = !isLowRamDevice(context) binding.ssiv.isEagerLoadingEnabled = !isLowRamDevice(context)
binding.ssiv.addOnImageEventListener(delegate) binding.ssiv.addOnImageEventListener(delegate)
@Suppress("LeakingThis")
bindingInfo.buttonRetry.setOnClickListener(this) bindingInfo.buttonRetry.setOnClickListener(this)
@Suppress("LeakingThis")
bindingInfo.buttonErrorDetails.setOnClickListener(this) bindingInfo.buttonErrorDetails.setOnClickListener(this)
binding.textViewNumber.isVisible = settings.isPagesNumbersEnabled binding.textViewNumber.isVisible = settings.isPagesNumbersEnabled
} }

@ -241,6 +241,7 @@ class AniListRepository(
descriptionHtml = json.getString("description"), descriptionHtml = json.getString("description"),
) )
@Suppress("FunctionName")
private fun AniListUser(json: JSONObject) = ScrobblerUser( private fun AniListUser(json: JSONObject) = ScrobblerUser(
id = json.getLong("id"), id = json.getLong("id"),
nickname = json.getString("name"), nickname = json.getString("name"),

@ -200,6 +200,7 @@ class MALRepository(
descriptionHtml = json.getString("synopsis"), descriptionHtml = json.getString("synopsis"),
) )
@Suppress("FunctionName")
private fun MALUser(json: JSONObject) = ScrobblerUser( private fun MALUser(json: JSONObject) = ScrobblerUser(
id = json.getLong("id"), id = json.getLong("id"),
nickname = json.getString("name"), nickname = json.getString("name"),

@ -207,6 +207,7 @@ class ShikimoriRepository(
descriptionHtml = json.getString("description_html"), descriptionHtml = json.getString("description_html"),
) )
@Suppress("FunctionName")
private fun ShikimoriUser(json: JSONObject) = ScrobblerUser( private fun ShikimoriUser(json: JSONObject) = ScrobblerUser(
id = json.getLong("id"), id = json.getLong("id"),
nickname = json.getString("nickname"), nickname = json.getString("nickname"),

@ -66,7 +66,7 @@ fun View.hasGlobalPoint(x: Int, y: Int): Boolean {
fun View.measureHeight(): Int { fun View.measureHeight(): Int {
val vh = height val vh = height
return if (vh == 0) { return if (vh == 0) {
measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED) measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED)
measuredHeight measuredHeight
} else vh } else vh
} }
@ -74,7 +74,7 @@ fun View.measureHeight(): Int {
fun View.measureWidth(): Int { fun View.measureWidth(): Int {
val vw = width val vw = width
return if (vw == 0) { return if (vw == 0) {
measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED) measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED)
measuredWidth measuredWidth
} else vw } else vw
} }
@ -178,7 +178,6 @@ val View.parents: Sequence<ViewParent>
} }
} }
@Suppress("unused")
fun View.measureDimension(desiredSize: Int, measureSpec: Int): Int { fun View.measureDimension(desiredSize: Int, measureSpec: Int): Int {
var result: Int var result: Int
val specMode = MeasureSpec.getMode(measureSpec) val specMode = MeasureSpec.getMode(measureSpec)

@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.widget.RemoteViews import android.widget.RemoteViews
import android.widget.RemoteViewsService import android.widget.RemoteViewsService
import androidx.core.graphics.drawable.toBitmap
import coil.ImageLoader import coil.ImageLoader
import coil.executeBlocking import coil.executeBlocking
import coil.request.ImageRequest import coil.request.ImageRequest
@ -15,7 +16,7 @@ import org.koitharu.kotatsu.base.domain.MangaIntent
import org.koitharu.kotatsu.history.domain.HistoryRepository import org.koitharu.kotatsu.history.domain.HistoryRepository
import org.koitharu.kotatsu.parsers.model.Manga import org.koitharu.kotatsu.parsers.model.Manga
import org.koitharu.kotatsu.parsers.util.replaceWith import org.koitharu.kotatsu.parsers.util.replaceWith
import org.koitharu.kotatsu.utils.ext.requireBitmap import org.koitharu.kotatsu.utils.ext.getDrawableOrThrow
class RecentListFactory( class RecentListFactory(
private val context: Context, private val context: Context,
@ -56,7 +57,7 @@ class RecentListFactory(
.tag(item.source) .tag(item.source)
.transformations(transformation) .transformations(transformation)
.build(), .build(),
).requireBitmap() ).getDrawableOrThrow().toBitmap()
}.onSuccess { cover -> }.onSuccess { cover ->
views.setImageViewBitmap(R.id.imageView_cover, cover) views.setImageViewBitmap(R.id.imageView_cover, cover)
}.onFailure { }.onFailure {

@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.widget.RemoteViews import android.widget.RemoteViews
import android.widget.RemoteViewsService import android.widget.RemoteViewsService
import androidx.core.graphics.drawable.toBitmap
import coil.ImageLoader import coil.ImageLoader
import coil.executeBlocking import coil.executeBlocking
import coil.request.ImageRequest import coil.request.ImageRequest
@ -16,7 +17,7 @@ import org.koitharu.kotatsu.core.prefs.AppWidgetConfig
import org.koitharu.kotatsu.favourites.domain.FavouritesRepository import org.koitharu.kotatsu.favourites.domain.FavouritesRepository
import org.koitharu.kotatsu.parsers.model.Manga import org.koitharu.kotatsu.parsers.model.Manga
import org.koitharu.kotatsu.parsers.util.replaceWith import org.koitharu.kotatsu.parsers.util.replaceWith
import org.koitharu.kotatsu.utils.ext.requireBitmap import org.koitharu.kotatsu.utils.ext.getDrawableOrThrow
class ShelfListFactory( class ShelfListFactory(
private val context: Context, private val context: Context,
@ -67,7 +68,7 @@ class ShelfListFactory(
.tag(item.source) .tag(item.source)
.transformations(transformation) .transformations(transformation)
.build(), .build(),
).requireBitmap() ).getDrawableOrThrow().toBitmap()
}.onSuccess { cover -> }.onSuccess { cover ->
views.setImageViewBitmap(R.id.imageView_cover, cover) views.setImageViewBitmap(R.id.imageView_cover, cover)
}.onFailure { }.onFailure {

@ -83,6 +83,7 @@
android:paddingHorizontal="@dimen/margin_normal" android:paddingHorizontal="@dimen/margin_normal"
android:singleLine="true" android:singleLine="true"
android:textAppearance="?textAppearanceTitleMedium" android:textAppearance="?textAppearanceTitleMedium"
tools:ignore="InconsistentLayout"
tools:text="@string/chapter_d_of_d" /> tools:text="@string/chapter_d_of_d" />
<TextView <TextView

@ -83,6 +83,7 @@
app:layout_behavior="org.koitharu.kotatsu.main.ui.MainActionButtonBehavior" app:layout_behavior="org.koitharu.kotatsu.main.ui.MainActionButtonBehavior"
app:layout_dodgeInsetEdges="bottom" app:layout_dodgeInsetEdges="bottom"
app:layout_insetEdge="bottom" app:layout_insetEdge="bottom"
tools:ignore="InconsistentLayout"
tools:visibility="visible" /> tools:visibility="visible" />
<org.koitharu.kotatsu.base.ui.widgets.SlidingBottomNavigationView <org.koitharu.kotatsu.base.ui.widgets.SlidingBottomNavigationView

@ -24,6 +24,7 @@
android:scrollIndicators="top|bottom" android:scrollIndicators="top|bottom"
android:scrollbars="vertical" android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:ignore="UnusedAttribute"
tools:listitem="@layout/item_source_locale" /> tools:listitem="@layout/item_source_locale" />
</LinearLayout> </LinearLayout>

@ -92,5 +92,5 @@
android:singleLine="true" android:singleLine="true"
android:textAppearance="?attr/textAppearanceBodySmall" android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
tools:text="@string/theme_name_mint" /> tools:text="@string/theme_name_miku" />
</LinearLayout> </LinearLayout>

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"

@ -31,16 +31,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="mail@mail.com" android:textAppearance="?textAppearanceBodyLarge"
android:textAppearance="?textAppearanceBodyLarge" /> tools:text="mail@mail.com" />
<TextView <TextView
android:id="@+id/last_checked" android:id="@+id/last_checked"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="Last checked: 6:00 PM" android:textAppearance="?textAppearanceBodySmall"
android:textAppearance="?textAppearanceBodySmall" /> tools:text="Last checked: 6:00 PM" />
</LinearLayout> </LinearLayout>

@ -26,4 +26,11 @@
<locale android:name="uk" /> <locale android:name="uk" />
<locale android:name="zh-CN" /> <locale android:name="zh-CN" />
<locale android:name="zh-TW" /> <locale android:name="zh-TW" />
<locale android:name="fil" />
<locale android:name="hi" />
<locale android:name="kk" />
<locale android:name="ko" />
<locale android:name="ne" />
<locale android:name="nn" />
<locale android:name="vi" />
</locale-config> </locale-config>

@ -4,8 +4,8 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:8.0.0' classpath 'com.android.tools.build:gradle:8.0.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.45' classpath 'com.google.dagger:hilt-android-gradle-plugin:2.45'
} }
} }
@ -20,16 +20,6 @@ allprojects {
} }
} }
String currentBranch() {
def branchName = ""
try {
branchName = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
} catch (ignored) {
println "Git not found"
}
return branchName
}
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

Loading…
Cancel
Save