better tests
This commit is contained in:
+2
-2
@@ -33,9 +33,9 @@ class KotlinAndroidGradleIT {
|
|||||||
|
|
||||||
val pathToKotlinPlugin = "-PpathToKotlinPlugin=" + File("local-repo").getAbsolutePath()
|
val pathToKotlinPlugin = "-PpathToKotlinPlugin=" + File("local-repo").getAbsolutePath()
|
||||||
val cmd = if (SystemInfo.isWindows)
|
val cmd = if (SystemInfo.isWindows)
|
||||||
listOf("cmd", "/C", "gradlew.bat", "compileDeployKotlin", "build", pathToKotlinPlugin, "--no-daemon", "--debug")
|
listOf("cmd", "/C", "gradlew.bat", "build", pathToKotlinPlugin, "--no-daemon", "--debug")
|
||||||
else
|
else
|
||||||
listOf("/bin/bash", "./gradlew", "compileDeployKotlin", "build", pathToKotlinPlugin, "--no-daemon", "--debug")
|
listOf("/bin/bash", "./gradlew", "build", pathToKotlinPlugin, "--no-daemon", "--debug")
|
||||||
|
|
||||||
val builder = ProcessBuilder(cmd)
|
val builder = ProcessBuilder(cmd)
|
||||||
builder.directory(projectDir)
|
builder.directory(projectDir)
|
||||||
|
|||||||
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
package AndroidAlfaProject.AndroidAlfa.src.main.java.org.jetbrains.kotlin.gradle.test.androidalfa;
|
package org.jetbrains.kotlin.gradle.test.androidalfa;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -7,6 +7,8 @@ import android.view.Menu;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.gradle.test.androidalfa.R;
|
||||||
|
|
||||||
public class MainActivity extends Activity {
|
public class MainActivity extends Activity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+22
-25
@@ -1,36 +1,33 @@
|
|||||||
package org.jetbrains.kotlin.gradle.test.androidalfa;
|
package org.jetbrains.kotlin.gradle.test.androidalfa
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent
|
||||||
import android.os.Bundle;
|
import android.os.Bundle
|
||||||
import android.app.Activity;
|
import android.app.Activity
|
||||||
import android.view.Menu;
|
import android.view.Menu
|
||||||
import android.view.View;
|
import android.view.View
|
||||||
import android.widget.Button;
|
import android.widget.Button
|
||||||
|
import org.jetbrains.kotlin.gradle.test.androidalfa.R
|
||||||
|
|
||||||
public class MainActivity2 extends Activity {
|
open class MainActivity2: Activity {
|
||||||
|
|
||||||
@Override
|
protected override fun onCreate(savedInstanceState: Bundle?): Unit {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
super.onCreate(savedInstanceState)
|
||||||
super.onCreate(savedInstanceState);
|
setContentView(R.layout.activity_main2)
|
||||||
setContentView(R.layout.activity_main2);
|
|
||||||
|
|
||||||
Button next = (Button) findViewById(R.id.Button02);
|
var next: Button = findViewById(R.id.Button02) as Button
|
||||||
next.setOnClickListener(new View.OnClickListener() {
|
next.setOnClickListener(object: View.OnClickListener() {
|
||||||
public void onClick(View view) {
|
public override fun onClick(view: View?): Unit {
|
||||||
Intent intent = new Intent();
|
val intent: Intent = Intent()
|
||||||
setResult(RESULT_OK, intent);
|
setResult(RESULT_OK, intent)
|
||||||
finish();
|
finish()
|
||||||
}
|
}
|
||||||
|
})
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||||
@Override
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
getMenuInflater().inflate(R.menu.main_activity2, menu);
|
getMenuInflater()?.inflate(R.menu.main_activity2, menu);
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user