Skip to content

Instantly share code, notes, and snippets.

View xian's full-sized avatar

Christian Williams xian

  • San Francisco, CA
View GitHub Profile
@xian
xian / ConsoleFormatters.kt
Last active October 22, 2020 03:31
Chrome console formatters for Kotlin maps, sets, and lists
@file:Suppress("ObsoleteKotlinJsPackages")
package baaahs.util
import kotlin.browser.window
object ConsoleFormatters {
fun install() {
window.asDynamic().devtoolsFormatters = arrayOf(
map, set, list
vertex shader:
#version 300 es
#ifdef GL_ES
precision mediump float;
#endif
in vec4 Vertex;
uniform mat4 viewProjMatrix;
package baaahs.glsl
import baaahs.*
import baaahs.geom.Vector2F
import baaahs.shows.GlslShow
import org.joml.Matrix4f
import org.lwjgl.BufferUtils
import org.lwjgl.glfw.GLFW.*
import org.lwjgl.glfw.GLFWErrorCallback
import org.lwjgl.glfw.GLFWFramebufferSizeCallback
package baaahs.glsl
import baaahs.*
import baaahs.geom.Vector2F
import baaahs.shows.GlslShow
import org.joml.Matrix4f
import org.lwjgl.BufferUtils
import org.lwjgl.glfw.GLFW.*
import org.lwjgl.glfw.GLFWErrorCallback
import org.lwjgl.glfw.GLFWFramebufferSizeCallback
package baaahs.shaders
import org.joml.Matrix4f
import org.joml.Quaternionf
import org.lwjgl.BufferUtils
import org.lwjgl.glfw.GLFW.*
import org.lwjgl.glfw.GLFWErrorCallback
import org.lwjgl.glfw.GLFWFramebufferSizeCallback
import org.lwjgl.glfw.GLFWKeyCallback
import org.lwjgl.opengl.GL
import kotlin.math.PI
// declarations
interface ThingWithMass {
fun weightInKilograms(): Double
}
// create a class
open class Animal(var age: Int)
This file has been truncated, but you can view the full file.
Build 'Robolectric / Build' #23, branch 'fix-windows'
Started 2019-02-26 11:33:51 on 'Mobile-DevX-Lab-Windows' by 'Super user ()'
Finished 2019-02-26 11:42:25 with status FAILURE 'Tests passed: 4492, ignored: 31; gradle exception (new); exit code 1 (Step: Gradle)'
VCS revisions: 'git://github.com/robolectric/robolectric.git#refs/heads/master' (Git): 239a84240d9fd62c79d72d51f3d00ae1a0c46434 (branch 'refs/heads/fix-windows')
TeamCity URL http://dhcp-100-91-62-136.sfo.corp.google.com/viewLog.html?buildId=26&buildTypeId=Robolectric_Build
TeamCity server version is 2018.2.2 (build 61245), server timezone: PST (UTC-08:00)
[11:33:50]E: bt1 (8m:35s)
[11:33:50]i: TeamCity server version is 2018.2.2 (build 61245)
[11:33:50] : The build is removed from the queue to be prepared for the start
[13:36:08] : [Step 1/1] :shadowapi:testClasses
[13:36:09] : [Step 1/1]
[13:36:09] : [Step 1/1] > Task :shadowapi:test
[13:36:09] : [Step 1/1] :shadowapi:test
[13:36:09] : [:shadowapi:test] Running tests with [-Drobolectric.enabledSdks=28]
[13:36:09] : [Step 1/1] org.robolectric.util.ReflectionHelpersTest
[13:36:09] : [org.robolectric.util.ReflectionHelpersTest] org.robolectric.util.ReflectionHelpersTest.getFieldReflectively_getsInheritedFields
[13:36:09] : [org.robolectric.util.ReflectionHelpersTest] org.robolectric.util.ReflectionHelpersTest.callStaticMethodReflectively_rethrowsUncheckedException
[13:36:09] : [org.robolectric.util.ReflectionHelpersTest] org.robolectric.util.ReflectionHelpersTest.callConstructorReflectively_rethrowsError
[13:36:09] : [org.robolectric.util.ReflectionHelpersTest] org.robolectric.util.ReflectionHelpersTest.setFieldReflectively_givesHelpfulExceptions
[17:54:09] :integration_tests:androidx:lint (3s)
[17:54:12] [:integration_tests:androidx:lint]
[17:54:12] [:integration_tests:androidx:lint] FAILURE: Build failed with an exception.
[17:54:12] [:integration_tests:androidx:lint]
[17:54:12] [:integration_tests:androidx:lint] * What went wrong:
[17:54:12] [:integration_tests:androidx:lint] Execution failed for task ':integration_tests:androidx:lint'.
[17:54:12] [:integration_tests:androidx:lint] > Lint found errors in the project; aborting build.
[17:54:12]
[17:54:12] Fix the issues identified by lint, or add the following to your build script to proceed with errors:
[17:54:12] ...
@xian
xian / build.gradle
Last active January 12, 2023 11:41
Download Robolectric dependencies for hermetic build
def robolectricVersion = '3.3'
def androidSdkVersions = [
'4.1.2_r1-robolectric-0',
'4.2.2_r1.2-robolectric-0',
'4.3_r2-robolectric-0',
'4.4_r1-robolectric-1',
'5.0.0_r2-robolectric-1',
'5.1.1_r9-robolectric-1',
'6.0.0_r1-robolectric-0',