This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import re | |
modulere = re.compile("""\s*compile\s*['"]([^:]+):([^:]+):([^:@]+)(@aar)?['"]""") | |
repore = re.compile("""\s*maven\s*\{\s*url\s*['"]([^'"]+)['"]\s*\}\s*""") | |
script = file("mobile/build.gradle", "r") | |
lines = script.readlines() | |
def convertlines(acc, l): | |
repo = re.match(repore, l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IO.apply({ | |
val iota$generatedContainer$1 = iota.IO.apply[android.widget.FrameLayout](new android.widget.FrameLayout(this)).perform.apply(); | |
Seq.apply(iota.IO.apply[android.view.View](new android.view.View(this))).foreach(((iov) => { | |
val iota$generatedView = iov.perform.apply(); | |
if (iota$generatedView.getParent().$bang$eq(null)) | |
iota$generatedView.getParent().asInstanceOf[ViewGroup].removeView(iota$generatedView) | |
else | |
(); | |
iota$generatedContainer$1.addView(iota$generatedView) | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def onCreateView(i: LayoutInflater, c: ViewGroup, b: Bundle) = { | |
adapter foreach (_.context = getActivity) | |
val v = layout.perform() | |
def inputHeight = for { | |
a <- MainActivity.instance | |
h <- a.inputHeight | |
} yield h | |
log.v("view hash: " + System.identityHashCode(v) + " " + System.identityHashCode(this) + " " + System.identityHashCode(layout)) | |
// why is this only occurring on gingerbread? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> android:lint | |
[error] [NewApi] src\main\res\drawable\ic_add_circle_black_24dp.xml:1:<vector> requires API level 21 (current min is 9) or building with Android Gradle plugin 1.4 or higher | |
[error] <vector xmlns:android="http://schemas.android.com/apk/res/android" | |
[error] ^ | |
[error] [NewApi] src\main\res\drawable\ic_add_circle_white_24dp.xml:1:<vector> requires API level 21 (current min is 9) or building with Android Gradle plugin 1.4 or higher | |
[error] <vector xmlns:android="http://schemas.android.com/apk/res/android" | |
[error] ^ | |
[error] [NewApi] src\main\res\drawable\ic_history_black_24dp.xml:1:<vector> requires API level 21 (current min is 9) or building with Android Gradle plugin 1.4 or higher | |
[error] <vector xmlns:android="http://schemas.android.com/apk/res/android" | |
[error] ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pfnguyen@GALACTICA src] $ git clone https://github.com/jakewharton/u2020 | |
Cloning into 'u2020'... | |
remote: Counting objects: 3519, done. | |
emote: Total 3519 (delta 0), reused 0 (delta 0), pack-reused 3519 | |
Receiving objects: 100% (3519/3519), 8.96 MiB | 1.28 MiB/s, done. | |
Resolving deltas: 100% (1598/1598), done. | |
Checking connectivity... done. | |
[pfnguyen@GALACTICA src] $ cd u2020/ | |
[pfnguyen@GALACTICA u2020] $ mkdir project | |
[pfnguyen@GALACTICA u2020] $ echo 'addSbtPlugin("com.hanhuy.sbt" % "android-gradle-build" % "1.1.9")' > project/p.sbt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> scripted | |
[info] :: delivering :: com.hanhuy.sbt#android-sdk-plugin;1.5.9-SNAPSHOT :: 1.5.9-SNAPSHOT :: integration :: Thu Nov 19 12:54:52 PST 2015 | |
[info] delivering ivy file to C:\Users\pfnguyen\src\sbt\target\scala-2.10\sbt-0.13\ivy-1.5.9-SNAPSHOT.xml | |
[info] Packaging C:\Users\pfnguyen\src\sbt\target\scala-2.10\sbt-0.13\android-sdk-plugin-1.5.9-SNAPSHOT.jar ... | |
[info] Done packaging. | |
[info] published android-sdk-plugin to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-SNAPSHOT\jars\android-sdk-plugin.jar | |
[info] published android-sdk-plugin to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-SNAPSHOT\srcs\android-sdk-plugin-sources.jar | |
[info] published android-sdk-plugin to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-SNAPSHOT\docs\android-sdk-plugin-javadoc.jar | |
[info] published ivy to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pfnguyen@galactica1:~/src/ts$ sbt "gen-android android-22 m.m m" | |
[info] Loading global plugins from /home/pfnguyen/.sbt/0.13/plugins | |
[info] Set current project to ts (in build file:/cifs/pfnguyen/src/ts/) | |
[info] Creating project: m | |
Created directory /cifs/pfnguyen/src/ts/src/main/java | |
Created directory /cifs/pfnguyen/src/ts/src/main/java/m/m | |
Added file ./src/main/java/m/m/MainActivity.java | |
Created directory /cifs/pfnguyen/src/ts/src/androidTest/java | |
Created directory /cifs/pfnguyen/src/ts/src/androidTest/java/m/m | |
Added file ./src/androidTest/java/m/m/MainActivityTest.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hanhuy.android.airshow | |
import java.net.{DatagramPacket, InetAddress, InetSocketAddress, DatagramSocket} | |
import java.nio.ByteBuffer | |
import java.nio.channels.DatagramChannel | |
import java.util.concurrent.TimeUnit | |
import android.content.res.Configuration | |
import android.graphics.Point | |
import android.hardware.display.VirtualDisplay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pfnguyen@galactica1:~/src/sbt-key-path-test$ sbt "keypath package test:compile" [info] Loading global plugins from /home/pfnguyen/.sbt/0.13/plugins | |
[info] Loading project definition from /cifs/pfnguyen/src/sbt-key-path-test/project | |
[info] Set current project to sbt-key-path-test (in build file:/cifs/pfnguyen/src/sbt-key-path-test/) | |
[info] Path: compile:package | |
[info] Looking for: compile:package <- test:compile | |
[error] No paths found | |
pfnguyen@galactica1:~/src/sbt-key-path-test$ sbt "keypath package update" | |
[info] Loading global plugins from /home/pfnguyen/.sbt/0.13/plugins | |
[info] Loading project definition from /cifs/pfnguyen/src/sbt-key-path-test/project | |
[info] Set current project to sbt-key-path-test (in build file:/cifs/pfnguyen/src/sbt-key-path-test/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val viewserver = Project(id = raw"""viewserver""", base = file(raw"""C:\Users\pfnguyen\src\vs2\viewserver""")).settings( | |
android.Plugin.androidBuildAar:_*).settings( | |
SettingKey[android.Keys.PackagingOptions]("packagingOptions") in config("android") := android.Keys.PackagingOptions(Nil, Nil, Nil), | |
SettingKey[scala.collection.Seq[sbt.Resolver]]("resolvers") ++= List(raw"""https://jcenter.bintray.com/""" at raw"""https://jcenter.bintray.com/""", | |
raw"""https://jcenter.bintray.com/""" at raw"""https://jcenter.bintray.com/""", | |
raw"""file:/C:/Users/pfnguyen/android-sdk-windows/extras/android/m2repository/""" at raw"""file:/C:/Users/pfnguyen/android-sdk-windows/extras/android/m2repository/""", | |
raw"""file:/C:/Users/pfnguyen/android-sdk-windows/extras/google/m2repository/""" at raw"""file:/C:/Users/pfnguyen/android-sdk-windows/extras/google/m2repository/"""), | |
SettingKey[java.lang.String]("platformTarget") in config("android") := raw"""android-21""", | |
SettingKey[java.lang.String]("nam |