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
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
// You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
// then apply it at the bottom of your module's build.gradle file like this: | |
// ...content of module's build.gradle file... | |
apply from: '../maven-publish-helper.gradle' | |
publishing { | |
publications { |
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.arch.lifecycle.GenericLifecycleObserver | |
import android.arch.lifecycle.Lifecycle | |
import android.arch.lifecycle.Lifecycle.Event.ON_DESTROY | |
import android.arch.lifecycle.LifecycleOwner | |
import kotlinx.coroutines.experimental.CoroutineScope | |
import kotlinx.coroutines.experimental.Dispatchers | |
import kotlinx.coroutines.experimental.Job | |
import kotlinx.coroutines.experimental.android.Main | |
fun Lifecycle.createJob(cancelEvent: Lifecycle.Event = ON_DESTROY): Job { |
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
#!/usr/bin/env kotlin | |
@file:DependsOn("com.github.ajalt.clikt:clikt-jvm:3.0.1") | |
import com.github.ajalt.clikt.core.CliktCommand | |
import com.github.ajalt.clikt.core.UsageError | |
import com.github.ajalt.clikt.output.TermUi | |
class App : CliktCommand() { | |
enum class DaemonType { |