Changed project language to scala.
This commit is contained in:
parent
84113de3ee
commit
ebc47e2c8e
9 changed files with 79 additions and 53 deletions
|
@ -56,6 +56,7 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/android-scala" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||||
|
|
|
@ -1,20 +1,54 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'android-scala'
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile "org.scala-lang:scala-library:2.11.2"
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 19
|
compileSdkVersion "android-20"
|
||||||
buildToolsVersion "20.0.0"
|
buildToolsVersion "20.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.nutomic.ensichat"
|
applicationId "com.nutomic.ensichat"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 19
|
targetSdkVersion 20
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.1.0"
|
versionName "0.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
scala {
|
||||||
|
srcDir "src/main/scala"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
androidTest {
|
||||||
|
scala {
|
||||||
|
srcDir "src/androidTest/scala"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
runProguard true
|
||||||
|
proguardFile file("proguard-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
runProguard false
|
runProguard true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFile file("proguard-rules.pro")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
7
app/proguard-rules.pro
vendored
7
app/proguard-rules.pro
vendored
|
@ -15,3 +15,10 @@
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
# public *;
|
# public *;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
-dontoptimize
|
||||||
|
-dontobfuscate
|
||||||
|
-dontpreverify
|
||||||
|
-dontwarn scala.**
|
||||||
|
-keep class !scala*.** { *; }
|
||||||
|
-ignorewarnings
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
package com.nutomic.ensichat;
|
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import android.test.ApplicationTestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
|
||||||
*/
|
|
||||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
|
||||||
public ApplicationTest() {
|
|
||||||
super(Application.class);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.nutomic.ensichat.activities;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import com.nutomic.ensichat.R;
|
|
||||||
|
|
||||||
|
|
||||||
public class MainActivity extends Activity {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.nutomic.ensichat.fragments;
|
|
||||||
|
|
||||||
import android.app.ListFragment;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import com.nutomic.ensichat.R;
|
|
||||||
|
|
||||||
public class ContactsFragment extends ListFragment {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
||||||
Bundle savedInstanceState) {
|
|
||||||
return inflater.inflate(R.layout.fragment_main, container, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.nutomic.ensichat.activities
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.os.Bundle
|
||||||
|
|
||||||
|
import com.nutomic.ensichat.R
|
||||||
|
|
||||||
|
class MainActivity extends Activity {
|
||||||
|
|
||||||
|
override def onCreate(savedInstanceState: Bundle): Unit = {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_main)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.nutomic.ensichat.fragments
|
||||||
|
|
||||||
|
import android.app.Fragment
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
|
||||||
|
import com.nutomic.ensichat.R
|
||||||
|
|
||||||
|
class ContactsFragment extends Fragment {
|
||||||
|
|
||||||
|
override def onCreateView(inflater: LayoutInflater, container: ViewGroup,
|
||||||
|
savedInstanceState: Bundle): View = {
|
||||||
|
return inflater.inflate(R.layout.fragment_contacts, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in a new issue