Skip to content

Instantly share code, notes, and snippets.

Artem Zanin illuzor

Block or report user

Report or block illuzor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@illuzor
illuzor / .gitlab-ci.yml
Last active Aug 12, 2019
Config for gitlab ci android with unit tests and instrumented tests
View .gitlab-ci.yml
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.3"
SDK_TOOLS: "4333796" # from https://developer.android.com/studio/#command-tools
EMULATOR_VERSION: "24"
before_script:
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${SDK_TOOLS}.zip
View f.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="define_int_commonsio" translatable="false" />
<string name="library_commonsio_author" translatable="false">The Apache Software Foundation</string>
<string name="library_commonsio_authorWebsite" translatable="false">http://apache.org</string>
<string name="library_commonsio_libraryName" translatable="false">Apache Commons IO</string>
<string name="library_commonsio_libraryDescription" translatable="false">Commons IO is a library of utilities to assist with developing IO functionality.</string>
<string name="library_commonsio_libraryWebsite" translatable="false">http://commons.apache.org/proper/commons-io/</string>
<string name="library_commonsio_libraryVersion" translatable="false">2.6</string>
<string name="library_commonsio_isOpenSource" translatable="false">true</string>
@illuzor
illuzor / graphics.coverter.xml
Last active Feb 22, 2016
graphics.coverter.xml
View graphics.coverter.xml
<project name="Graphics Converter" default="atlasses.and.gafs" basedir="..">
<!--путь к air sdk-->
<property name="flex.home" location="C:/Program Files (x86)/FlexSDK/AIR SDK" />
<!--путь к pvr2atf-->
<property name="atf.tool" location="${flex.home}/atftools/pvr2atf.exe" />
<!--путь к PVRTexToolCLI-->
<property name="pvr.tool" location="C:/Program Files/PowerVR/Tool/PVRTexTool/CLI/Windows_x86_32/PVRTexToolCLI.exe" />
<!--путь к атласам в формате pvr-->
View gist:8271063
package {
import flash.display.Bitmap;
import starling.display.Shape;
import starling.display.Sprite;
import starling.events.Event;
import starling.textures.Texture;
public class GraphicsTest extends Sprite {
View ShapeTest.as
var backTexture:SubTexture = atlas.getTexture("menuBackground") as SubTexture;
var clipping:Rectangle = backTexture.clipping;
var uvMatrix:Matrix = new Matrix();
uvMatrix.scale(stage.stageWidth / (backTexture.width * clipping.width), stage.stageHeight / (backTexture.height * clipping.height));
var background:Shape = new Shape();
addChild(background);
background.graphics.beginTextureFill(backTexture, uvMatrix);
background.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
background.graphics.endFill();
View TextureFillTest.as
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Rectangle;
import starling.core.Starling;
public class Main extends Sprite {
public function Main():void {
View Class.as
private var myText:TextField; // move the var to class-level
// if you create var inside function it not be visible in another function
private function init(e:Event = null):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
trace('stage has been found')
stage.addEventListener(KeyboardEvent.KEY_DOWN, EnterStart);
myText = new TextField();
myText.text = "Republic of Code";
addChild(myText);
View build.xml
<target name="copy.files" description="Files operations">
<unzip src="temp/libs/notifExtLib.swc" dest="temp/libs/"/>
<copy file="extension.xml" tofile="temp/ane/extension.xml"/>
<copy file="temp/libs/library.swf" tofile="temp/ane/android/library.swf"/>
<move file="temp/libs/library.swf" tofile="temp/ane/default/library.swf"/>
<move file="temp/libs/notifExtLib.swc" tofile="temp/ane/notifExtLib.swc"/>
</target>
View build.xml
<target name="compile.swc" description="Making swc lib">
<compc
failonerror="true"
use-network="false"
debug="false"
swf-version="22"
output="temp/libs/notifExtLib.swc">
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml" />
<include-sources dir="${as.classes}">
<include name="**/*.as*" />
View build.xml
<target name="build.ane" description="Making ane file">
<exec executable="${FLEX_HOME}/bin/adt.bat" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="ane_ready_for_use/com.illuzor.extensions.NotificationExtension.ane"/>
<arg value="temp/ane/extension.xml"/>
<arg line="-swc"/>
<arg line="temp/ane/notifExtLib.swc"/>
<arg line="-platform Android-ARM -C temp/ane/android/ ."/>
You can’t perform that action at this time.