This file contains hidden or 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
| -- Layout Switch | |
| ctrlPressed = false | |
| keyPressed = false | |
| eventTypes = hs.eventtap.event.types | |
| events = { eventTypes.flagsChanged, eventTypes.keyUp } | |
| function indexOf(table, value) | |
| local index = -1 | |
| for i = 1, #table do |
This file contains hidden or 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
| subprojects { | |
| afterEvaluate { | |
| if (project.hasProperty('kapt')) kapt { | |
| javacOptions { | |
| option("-source", "8") | |
| option("-target", "8") | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or 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
| > Task :app:compileDebugJavaWithJavac FAILED | |
| /Users/stepango/AndroidStudioProjects/Java11/app/build/generated/source/kapt/debug/com/stepango/java11/di/DaggerRootComponent.java:4: error: package javax.annotation.processing does not exist | |
| import javax.annotation.processing.Generated; | |
| ^ | |
| /Users/stepango/AndroidStudioProjects/Java11/app/build/generated/source/kapt/debug/com/stepango/java11/di/DaggerRootComponent.java:6: error: cannot find symbol | |
| @Generated( | |
| ^ | |
| symbol: class Generated | |
| 2 errors |
This file contains hidden or 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 dagger.Component | |
| @Component | |
| interface RootComponent { | |
| fun inject(app: MainActivity) | |
| } |
This file contains hidden or 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
| git diff $(git merge-base master $(git rev-parse --abbrev-ref HEAD)) |
This file contains hidden or 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 os | |
| path = os.path.dirname(os.path.realpath(__file__)) | |
| pattern = """public final class R { | |
| private R() {} | |
| }""" | |
| # r=root, d=directories, f = files |
This file contains hidden or 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
| apply plugin: 'java' | |
| buildDir = "gradleBuild" | |
| def buildBazel = tasks.register("buildBazel", Exec) { | |
| finalizedBy(tasks.named("compileJava")) | |
| workingDir '../' | |
| commandLine 'bazel', 'build', '//' + project.name + ":bali" | |
| } |
This file contains hidden or 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
| rm -rf `find . -type d -name build` |
This file contains hidden or 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
| val nameText = ObservableBoolean(nameHint) { it.isEmpty() } | |
| fun <T: Any> ObservableBoolean(o: ObservableField<T>, f:(T) -> Boolean): ObservableBoolean { | |
| return ObservableBoolean() | |
| .apply { | |
| o.observe { | |
| this.set(f(it!!)) | |
| } | |
| } | |
| } |
This file contains hidden or 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
| // your_project_folder/build.gradle | |
| allprojects { | |
| if (new File("your_ram_disk_path").exists()) | |
| buildDir = "your_ram_disk_path/build/${rootProject.name}/${project.name}" | |
| } |
NewerOlder