View settings.gradle.kts
/** [name] 디렉터리 아래의 모듈을 모두 탐색하여 `AAA:BBB:CCC` 형식으로 반환한다. */ | |
fun submodule(name: String): Array<String> { | |
// 모듈 디렉터리 탐색하기 | |
val submoduleDirs: List<File> = fileTree(name) | |
.matching { include("**/*.gradle.kts") } | |
.map { gradleScript: File -> gradleScript.parentFile } | |
.distinct() | |
// gradle 프로젝트 이름 형식으로 고치기 | |
return submoduleDirs |
View AnyTest.kt
class AnyTest { | |
@Test | |
fun test() { | |
"스파게티".matches("*스파게티").let { println(it) } | |
"스파게티".matches("스파게티").let { println(it) } | |
"소스파게티".matches("*스파게티").let { println(it) } | |
"소스파게티".matches("스파게티*").let { println(it) } | |
"스파게티테".matches("*스파게티").let { println(it) } | |
} |
View config.yml
version: 2 | |
jobs: | |
build: | |
working_directory: ~/code | |
docker: | |
- image: circleci/android:api-28-alpha | |
environment: | |
JVM_OPTS: -Xmx3200m | |
TZ: "/usr/share/zoneinfo/Asia/Seoul" | |
steps: |
View build.gradle
apply plugin: 'kotlin' | |
// 의존성 | |
dependencies { | |
// 로컬 JAR | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
// 코틀린 | |
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | |
} |
View build.gradle
buildscript { | |
ext.kotlin_version = '1.2.71' | |
repositories { | |
google() | |
jcenter() | |
maven { url 'https://dl.bintray.com/minyushov/gradle' } | |
} | |
dependencies { |
View SchoolSearchView.kt
package winapi251.app.schoolmeal.ui.main | |
import android.content.Context | |
import android.database.MatrixCursor | |
import android.util.Log | |
import androidx.appcompat.widget.SearchView | |
import androidx.cursoradapter.widget.SimpleCursorAdapter | |
import kotlinx.coroutines.experimental.Dispatchers | |
import kotlinx.coroutines.experimental.GlobalScope | |
import kotlinx.coroutines.experimental.android.Main |
View AndroidManifest.xml
<!-- 안드로이드 매니페스트 --> | |
<manifest | |
package = "boxresin.app.barcodescanner" | |
xmlns:android = "http://schemas.android.com/apk/res/android" | |
xmlns:tools = "http://schemas.android.com/tools"> | |
<application | |
android:allowBackup = "false" | |
android:icon = "@mipmap/ic_launcher" | |
android:label = "@string/app_name" |
View ExampleInstrumentedTest.kt
package winapi251.app.schoolmeal | |
import android.content.Context | |
import androidx.test.core.app.ApplicationProvider | |
import androidx.test.ext.junit.runners.AndroidJUnit4 | |
import org.junit.Assert.assertEquals | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
@RunWith(AndroidJUnit4::class) |
View AndroidStudio.gitignore
### Android ### | |
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the Dalvik VM | |
*.dex | |
# Java class files | |
*.class |
View git-commands.sh
// Move the branch pointer to a different commit | |
git branch -f branch-name commit-name | |
// Cancel merging | |
git reset --hard ORIG_HEAD | |
git reset --merge ORIG_HEAD ;; If you wanna keep your changes | |
// Cancel editing a file | |
git checkout -- <file> |
NewerOlder