Skip to content

Instantly share code, notes, and snippets.

View wangerekaharun's full-sized avatar

Harun Wangereka wangerekaharun

View GitHub Profile
[
{
"id": "TxXuh_hAFd8",
"created_at": "2020-07-01T18:32:22-04:00",
"updated_at": "2020-08-14T01:07:39-04:00",
"promoted_at": null,
"width": 6016,
"height": 4016,
"color": "#101515",
"description": null,
@wangerekaharun
wangerekaharun / dooka
Created August 12, 2020 12:58
Dokka Target Plugin Not Found Error
> Task :dokka
Could not find target with name: in Kotlin Gradle Plugin
Could not find target with name: in Kotlin Gradle Plugin
Could not find target with name: in Kotlin Gradle Plugin
@wangerekaharun
wangerekaharun / build.gradle.kts
Created August 12, 2020 12:39
Dokka configurations
tasks.dokka {
outputFormat = "html"
outputDirectory = "$buildDir/dokka"
}
@wangerekaharun
wangerekaharun / gradleErrror
Created August 12, 2020 12:27
Error when you don't include the android and kotlin plugins
Unable to load class 'com.android.build.gradle.BaseExtension'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
@wangerekaharun
wangerekaharun / completesettings.gradle.kts
Created August 11, 2020 10:40
Whole settings script
pluginManagement {
repositories {
jcenter()
google()
gradlePluginPortal()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
plugins {
id("com.android.application") version "4.0.1"
@wangerekaharun
wangerekaharun / settings.gradle.kts
Created August 11, 2020 10:38
pluginManagement versions configurations
pluginManagement {
plugins {
id("com.android.application") version "4.0.1"
id("org.jetbrains.kotlin.android") version "1.3.72"
id("org.jetbrains.kotlin.android.extensions") version "1.3.72"
id("com.android.library") version "4.0.1"
id("com.google.firebase.crashlytics") version "2.1.0"
}
}
@wangerekaharun
wangerekaharun / build.gradle.kts
Created August 11, 2020 10:36
Root project level gradle file with plugins block
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id(BuildPlugins.ktlintPlugin) version Versions.ktlint
id(BuildPlugins.detektPlugin) version Versions.detekt
id(BuildPlugins.androidLibrary) apply false
id(BuildPlugins.androidApplication) apply false
id(BuildPlugins.kotlinAndroid) apply false
id(BuildPlugins.kotlinAndroidExtensions) apply false
id(BuildPlugins.dokkaPlugin) version Versions.dokka
}
@wangerekaharun
wangerekaharun / build.gradle.kts
Created August 11, 2020 10:06
Root Project Gradle File Congiguration using the buildscript block
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath(BuildPlugins.androidGradlePlugin)
classpath(BuildPlugins.kotlinGradlePlugin)
}
data class LocationAndAccelerations(
@Embedded val locationModel: LocationModel,
@Relation(
parentColumn = "id" ,
entityColumn = "gpsId"
)
val accelerations: List<AccelerationModel>
)
@Transaction
> Task :features:home:detekt FAILED
Property 'complexity>LongParameterList>threshold' is deprecated. Use 'functionThreshold' and 'constructorThreshold' instead.
14 kotlin files were analyzed.
/home/harun/AndroidStudioProjects/droidconKE2020App/features/home/src/main/java/com/android254/droidconKE2020/home/viewmodel/HomeViewModel.kt - 5min debt
StringLiteralDuplication - 5/3 - [refreshSponsors] at /home/harun/AndroidStudioProjects/droidconKE2020App/features/home/src/main/java/com/android254/droidconKE2020/home/viewmodel/HomeViewModel.kt:162:21
/home/harun/AndroidStudioProjects/droidconKE2020App/features/home/src/main/java/com/android254/droidconKE2020/home/ui/views/HomeFragment.kt - 1h 45min debt
TooManyFunctions - 15/11 - [HomeFragment] at /home/harun/AndroidStudioProjects/droidconKE2020App/features/home/src/main/java/com/android254/droidconKE2020/home/ui/views/HomeFragment.kt:39:7
ForbiddenComment - [<anonymous>] at /home/harun/AndroidStudioProjects/droidconKE2020App/features/home/src/main/java/com/andr