Skip to content

Instantly share code, notes, and snippets.

View BoD's full-sized avatar

Benoit 'BoD' Lubek BoD

View GitHub Profile
  • KT-59139: ‘Protocol message contained an invalid tag (zero)’ during project configuration
  • KT-59151: NullPointerException in Fir2IrClassifierStorage.preCacheBuiltinClasses
  • KT-60652: Expect declaration doesn't match actual because some expected members have no actual ones
  • KT-62671: Fir2ir generates a duplicate of delegated function for class from a common module
  • KT-57888: Inconsistency on reference to declaration with invisible receiver type of intersection-typed value in complex Java hierarchy
  • KT-60958: Smart cast does not work with definite return from if block
  • KT-65840: Initializer type mismatch: expected 'Type', actual 'Type'
  • [KT-65105](https://youtrack.j
@BoD
BoD / gradle-do-not-cleanup.md
Created July 28, 2023 13:30
How to make Gradle stop re-downloading the same artifacts again and again

~/.gradle/gradle.properties:

org.gradle.cache.cleanup=false

~/.gradle/init.gradle.kts:

@BoD
BoD / java-runtime-examples.md
Last active October 25, 2022 14:54
Java runtime vs without

1. Simple query

Kotlin

// Async code looks like sync code

val result = try {
  val response = apolloClient.query(query).execute()
  println(response.data)
} catch (e: Exception) {
 e.printStackTrace()
@BoD
BoD / Android API Levels.md
Last active December 4, 2021 17:33
Android API Levels
Api level Android version Code name Release date
1 1.0 Base October 2008
2 1.1 Base 1.1 February 2009
3 1.5 Cupcake May 2009
4 1.6 Donut September 2009
5 2.0 Eclair November 2009
6 2.0.1 Eclair 0.1 December 2009
7 2.1 Eclair MR1 January 2010
8 2.2 Froyo June 2010
@BoD
BoD / MyMppLibrary.h
Created November 9, 2021 15:37
Generated Header file for ObjC/Swift from a simple example Kotlin Multiplatform library
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSError.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>
@class MMLBrandSealedClass, MMLApple, MMLCoffee, MMLKotlinEnumCompanion, MMLKotlinEnum<E>, MMLColorEnum, MMLKotlinArray<T>, MMLOtherDrink, MMLSamsung, MMLSoda, MMLSomeObject, MMLSony, MMLTea;
//
// ViewController.swift
// klibqonto demo app
//
// Created by Benoit Lubek on 04/11/2019.
// Copyright © 2019 BoD. All rights reserved.
//
import UIKit
import klibqonto
@BoD
BoD / .travis.yml
Created March 5, 2017 23:42
Travis build file for Android: 'env' block
env:
- ANDROID_HOME=$HOME/android-sdk
@BoD
BoD / .travis.yml
Last active October 27, 2020 13:25
Travis build file for Android: the whole file
language: java
dist: trusty
jdk: oraclejdk8
before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
@BoD
BoD / .travis.yml
Last active June 28, 2020 17:47
Travis build file for Android: 'cache' block
cache:
directories:
# Android SDK
- $HOME/android-cmdline-tools
- $HOME/android-sdk
@BoD
BoD / .travis.yml
Last active June 28, 2020 17:46
Travis build file for Android: 'install' block
install:
# Download and unzip the Android command line tools (if not already there thanks to the cache mechanism)
# Latest version of this file available here: https://developer.android.com/studio/#command-tools
- if test ! -e $HOME/android-cmdline-tools/cmdline-tools.zip ; then curl https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip > $HOME/android-cmdline-tools/cmdline-tools.zip ; fi
- unzip -qq -n $HOME/android-cmdline-tools/cmdline-tools.zip -d $HOME/android-cmdline-tools
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism)
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platform-tools' > /dev/null
# Latest version of build-tools available here: https://developer.android.com/studio/releases/build-tools.html
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'build-tools;29.0.3' > /dev/null