Skip to content

Instantly share code, notes, and snippets.

View zskamljic's full-sized avatar

Žan Skamljič zskamljic

View GitHub Profile
package com.equaleyes.demoplugin;
import org.gradle.api.*;
@NonNullApi
public class DemoPlugin implements Plugin<Project> {
private static final String TRANSFORM_CLASS = "com.android.build.api.transform.Transform";
private static final String ERROR_PLUGIN_REQUIRED = "'com.android.application' or 'com.android.library' plugin required";
private static final String ERROR_PLUGIN_OUTDATED = "Gradle plugin 1.5.0 or later is required.";
package com.equaleyes.demoplugin;
import org.gradle.api.*;
@NonNullApi
public class DemoPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
}
}
final deps = [
gradle: "com.android.tools.build:gradle:3.2.0-beta01"
]
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation gradleApi()
compileOnly deps.gradle
% xclip -o -sel clip | sed -e "s/+/-/g" -e "s/\//_/g" -e "s/=//g"
05PViaXOrOHfbwKE7-cIzybB8WJW-VGaJSxGnyC6DNA
% xclip -o -sel clip | base64 -d | xxd
00000000: 982e fa22 5a45 006c f205 4bb1 a50a d759 ..."ZE.l..K....Y
00000010: 1cbf 35c8 aee8 e723 970c f908 858e 16fe ..5....#........
% dd if=/dev/urandom bs=32 count=1 | base64 | xclip -sel clip
1+0 records in
1+0 records out
32 bytes copied, 3.5033e-05 s, 913 kB/s
% dd if=/dev/urandom bs=32 count=1 | base64
1+0 records in
1+0 records out
32 bytes copied, 4.5217e-05 s, 708 kB/s
wH481/xffFQvDRhSYUJ59AcNZAgcUg30D0oz0qAoEZE=
% dd if=/dev/urandom bs=32 count=1 | xxd
1+0 records in
1+0 records out
32 bytes copied, 3.4792e-05 s, 920 kB/s
00000000: 2aa7 f2b1 f301 52fc 612d be0c f413 d8ae *.....R.a-......
00000010: 5715 2618 59b1 0056 0f81 332e b93b 4a59 W.&.Y..V..3..;JY
ConstraintSet constraints = new ConstraintSet();
constraints.clone(this, R.layout.activity_main_top_right);
TransitionManager.beginDelayedTransition(binding.constraintLayout);
constraints.applyTo(binding.constraintLayout);
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/one"
android:layout_width="0dp"
android:layout_height="wrap_content"