Android plugin cli arguments test

This commit is contained in:
Yan Zhulanow
2015-02-26 19:36:01 +03:00
parent 41d9477870
commit 7d31b56ef6
10 changed files with 68 additions and 0 deletions
@@ -0,0 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp"
android:versionCode="1"
android:versionName="1.0" >
</manifest>
@@ -0,0 +1,9 @@
package android.app
public open class Activity {
public open fun findViewById([suppress("UNUSED_PARAMETER")] id: Int): android.view.View = null!!
}
public open class Fragment {
public open fun getView(): android.view.View = null!!
}
@@ -0,0 +1,5 @@
package android.view
public open class View {
public open fun findViewById([suppress("UNUSED_PARAMETER")] id: Int): android.view.View = null!!
}
@@ -0,0 +1,5 @@
package android.widget
public open class TextView : android.view.View() {
public fun setText([suppress("UNUSED_PARAMETER")] text: String) {}
}
@@ -0,0 +1,5 @@
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
@@ -0,0 +1,12 @@
-d
$TEMP_DIR$
-Xplugin
dist/kotlinc/lib/android-compiler-plugin.jar
-P
plugin:org.jetbrains.kotlin.android:androidManifest=$TESTDATA_DIR$/androidPlugin/AndroidManifest.xml
-P
plugin:org.jetbrains.kotlin.android:androidRes=$TESTDATA_DIR$/androidPlugin/res
$TESTDATA_DIR$/pluginSimple.kt
$TESTDATA_DIR$/androidPlugin/androidApp.kt
$TESTDATA_DIR$/androidPlugin/androidView.kt
$TESTDATA_DIR$/androidPlugin/androidWidget.kt
@@ -0,0 +1,8 @@
import android.view.*
import android.app.*
import android.widget.*
import kotlinx.android.synthetic.layout.*
class MyActivity : Activity() {
init { textView.setText("Some text") }
}
@@ -0,0 +1 @@
OK