Skip to content

Instantly share code, notes, and snippets.

@cybertk
cybertk / rake-update-version-android-manifest.rb
Last active March 4, 2016 18:46
Update version in AndroidManifest.xml
task :update_build_number do
File.open('AndroidManifest.xml', 'r+') do |f|
manifest = f.read
build = ENV['TRAVIS_BUILD_NUMBER'] || 0
# Update version
manifest = manifest.gsub(
/android:versionCode=".*"/, "android:versionCode=\"#{build}\"")
# Write back
@staltz
staltz / introrx.md
Last active June 15, 2024 12:24
The introduction to Reactive Programming you've been missing
@rafali
rafali / ResizeAnimation.java
Last active February 26, 2021 13:05
Resize animation on Android
public class ResizeAnimation extends Animation {
final int startWidth;
final int targetWidth;
View view;
public ResizeAnimation(View view, int targetWidth) {
this.view = view;
this.targetWidth = targetWidth;
startWidth = view.getWidth();
}
@topgenorth
topgenorth / Rakefile.rb
Created March 5, 2013 20:51
Rakefile for packaging release APK's for Xamarin.Android
require 'albacore'
@file_version = "2.0.0.0"
@keystore = "../keystores/opgenorth-release-key.keystore"
@alias_name = "mytrips"
@input_apk = "EmploymentStandardsJudgments.Android/bin/Release/net.opgenorth.esj.apk"
@signed_apk = "EmploymentStandardsJudgments.Android/bin/Release/net.opgenorth.esj-signed.apk"
@final_apk = "deploy/AlbertaEmploymentJudgments.apk"
task :default => [:clean, :versioning, :build, :sign]