Skip to content

Instantly share code, notes, and snippets.

View cortinico's full-sized avatar
♦️
Reticulating splines...

Nicola Corti cortinico

♦️
Reticulating splines...
View GitHub Profile
@cortinico
cortinico / README.md
Last active April 12, 2022 12:07
reproducer-rn-33611

To verify that facebook/react-native#33611 works correctly on windows, follow those steps:

  1. Create a new project on RN 0.68.0 with: npx react-native init RN068 --version 0.68.0 --skip-install
  2. Install packages with cd RN068 && yarn
  3. Opt-in for New Architecture by editing android/gradle.properties and setting newArchEnabled=true
  4. Verify that build is broken on Android on Windows: cd android && ./gradlew assembleDebug --scan
    1. This step will prompt to publish a Gradle Scan at the of the build. Type yes and publish it.
    2. Make sure that the build actually failed.
  5. Apply the fix33611-v3.patch attached to this Gist to your local environment: cd .. && git apply fix33611.patch
  6. Verify that build works correctly on Android on Windows now: cd android && ./gradlew assembleDebug --scan
@cortinico
cortinico / appintro-build.yml
Created November 2, 2020 14:26
How-to Github Actions: Build Matrix - Example Detekt
jobs:
build-debug-apk:
strategy:
fail-fast: false
matrix:
agp: [""]
kotlin: [""]
experimental: [false]
name: ["stable"]
include:
@cortinico
cortinico / detekt-build.yml
Created November 2, 2020 14:23
How-to Github Actions: Build Matrix - Example Detekt
jobs:
gradle:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
jdk: [8, 11, 14]
runs-on: ${{ matrix.os }}
env:
JDK_VERSION: ${{ matrix.jdk }}
@cortinico
cortinico / ColorCustomLayoutFragment.java
Created August 5, 2020 07:46
AppIntro SlideBackgroundColorHolder example
package com.github.appintro.example.ui;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.ColorInt;
import androidx.annotation.LayoutRes;
@cortinico
cortinico / build-app-workflow.yaml
Created July 29, 2020 07:11
The simplest workflow to build your Android App on Github Actions
name: Build
on: [pull_request, push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Build the app
run: ./gradlew build
@cortinico
cortinico / Dependencies.kt
Created June 16, 2020 13:15
Dependencies.kt
object Versions {
const val APPCOMPAT = "1.1.0"
const val CORE_KTX = "1.2.0"
const val JUNIT = "4.13"
}
object SupportLibs {
const val ANDROIDX_APPCOMPAT = "androidx.appcompat:appcompat:${Versions.APPCOMPAT}"
const val ANDROIDX_CORE_KTX = "androidx.core:core-ktx:${Versions.CORE_KTX}"
}
object TestingLib {
@cortinico
cortinico / keybase.md
Created May 24, 2020 17:44
keybase.md

Keybase proof

I hereby claim:

  • I am cortinico on github.
  • I am cortinico (https://keybase.io/cortinico) on keybase.
  • I have a public key ASBikTBl3AvBwXf5miz-ksS5eFeJb_7KokhEolSo3am8fQo

To claim this, I am signing this object:

@cortinico
cortinico / Kotlin.xml
Created April 6, 2020 15:00
.debug -> .also(::println) Live Template
<templateSet group="Kotlin">
<template name="debug" value="also(::println)" description="Print a debug log" toReformat="false" toShortenFQNames="true">
<context>
<option name="KOTLIN" value="true" />
<option name="KOTLIN_COMMENT" value="false" />
<option name="KOTLIN_TOPLEVEL" value="false" />
</context>
</template>
</templateSet>
final public void doMaintenance$com_github_ChuckerTeam_Chucker_library()
final public void doMaintenance$library_release()