Skip to content

Instantly share code, notes, and snippets.

@alexxgarci
alexxgarci / build.gradle
Last active September 4, 2025 14:34
Build gradle script for realigning librealm.so library to 16 kb pagesize
// ==========================================
// 16KB PAGE SIZE REALM LIBRARY FIX
// ==========================================
task realignRealmLibraries {
description 'Realign Realm native libraries to 16KB page size'
group 'build'
doLast {
// Process all build variants
//
// Base32.swift
// Created by Steve Streza on 26.9.14.
// Updated by Martin Troup on 4.11.16.
//
import Foundation
func Base32Encode(data: Data) -> String {
let alphabet = [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "2", "3", "4", "5", "6", "7"]
return Base32Encode(data: data, alphabet: alphabet)