This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Application | |
import android.arch.lifecycle.LiveData | |
import android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.Network | |
import android.net.NetworkInfo | |
import android.net.NetworkRequest | |
import android.os.Build | |
import android.support.annotation.RequiresPermission | |
import android.support.annotation.VisibleForTesting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Utils { | |
fun multipleBy2(x: Int) = x * 2 | |
} | |
class UtilsTest { | |
@Test | |
fun x1__multiplyBy2__2() { | |
// GIVEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def camerax_version = "1.0.0-alpha01" | |
implementation "androidx.camera:camera-core:${camerax_version}" | |
implementation "androidx.camera:camera-camera2:${camerax_version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configurations { | |
// ... | |
xmlchecker | |
} | |
dependencies { | |
// ... | |
xmlchecker fileTree(dir: "$project.rootDir/.../xmlchecker/libs", include: ['*.jar']) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.pinterest.ktlint.core.Rule | |
import org.jetbrains.kotlin.KtNodeTypes | |
import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION | |
import org.jetbrains.kotlin.com.intellij.lang.ASTNode | |
import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.CompositeElement | |
import org.jetbrains.kotlin.com.intellij.psi.tree.TokenSet | |
import package.Utils | |
class NamedParametersRule(private val shouldError: Boolean = false) : Rule(RULE_ID) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.pinterest.ktlint.core.Rule | |
import org.jetbrains.kotlin.KtNodeTypes.BLOCK | |
import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION | |
import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION | |
import org.jetbrains.kotlin.KtNodeTypes.FUNCTION_LITERAL | |
import org.jetbrains.kotlin.KtNodeTypes.LAMBDA_ARGUMENT | |
import org.jetbrains.kotlin.KtNodeTypes.LAMBDA_EXPRESSION | |
import org.jetbrains.kotlin.KtNodeTypes.PROPERTY_DELEGATE | |
import org.jetbrains.kotlin.KtNodeTypes.REFERENCE_EXPRESSION | |
import org.jetbrains.kotlin.KtNodeTypes.VALUE_PARAMETER_LIST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jetbrains.kotlin.KtNodeTypes | |
import org.jetbrains.kotlin.com.intellij.lang.ASTNode | |
import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.TreeUtil | |
import org.jetbrains.kotlin.psi.KtClass | |
internal object Utils { | |
internal fun getOuterClass(node: ASTNode?): KtClass? { | |
return TreeUtil.findParent(node, KtNodeTypes.CLASS)?.psi as? KtClass | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MIT License | |
* | |
* Copyright (c) 2020 Brightec | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MIT License | |
* | |
* Copyright (c) 2020 Brightec | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
OlderNewer