diff --git a/.gitignore b/.gitignore index 1f1d8a2..0902448 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ # generated files bin/ gen/ +.cxx/ # Local configuration file (sdk path, etc) local.properties @@ -27,8 +28,6 @@ proguard/ *.ipr *.iws .idea/ - -*.iml .gradle /local.properties /.idea/workspace.xml diff --git a/NeoLang/build.gradle b/NeoLang/build.gradle index e95d65f..35c13da 100644 --- a/NeoLang/build.gradle +++ b/NeoLang/build.gradle @@ -6,9 +6,6 @@ dependencies { compile rootProject.ext.deps["kotlin-stdlib"] } -sourceCompatibility = "1.7" -targetCompatibility = "1.7" - buildscript { repositories { mavenCentral() @@ -30,7 +27,6 @@ compileTestKotlin { jvmTarget = "1.8" } } - dependencies { testImplementation rootProject.ext.deps["junit"] } diff --git a/NeoTermBridge/bintray.gradle b/NeoTermBridge/bintray.gradle deleted file mode 100644 index ef75194..0000000 --- a/NeoTermBridge/bintray.gradle +++ /dev/null @@ -1,71 +0,0 @@ -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' - -def siteUrl = 'https://github.com/NeoTerm/NeoTerm.git' -def gitUrl = 'https://github.com/NeoTerm/NeoTerm.git' -def libraryGroup = "io.neoterm.bridge" -def libraryRepoName = "neoterm-bridge" -def libraryDesc = "Communicate with NeoTerm in an elegant way." -def libraryVersionCode = 1 -def libraryVersionName = "1.0" -def libraryLicences = ["MIT"] - -group = libraryGroup -version = libraryVersionName + "-" + libraryVersionCode - -install { - repositories.mavenInstaller { - pom { - project { - packaging 'aar' - name libraryDesc - url siteUrl - licenses { - license { - name 'The MIT Software License' - url 'https://mit-license.org/' - } - } - developers { - developer { - id 'imkiva' - name 'imKiva' - email 'libkernelpanic@gmail.com' - } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - } - } - } - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -artifacts { - archives sourcesJar -} - -Properties properties = new Properties() -properties.load(project.file('../local.properties').newDataInputStream()) -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - configurations = ['archives'] - pkg { - repo = "maven" - name = libraryRepoName - websiteUrl = siteUrl - vcsUrl = gitUrl - dryRun = false - licenses = libraryLicences - publish = true - publicDownloadNumbers = true - } -} diff --git a/NeoTermBridge/build.gradle b/NeoTermBridge/build.gradle index a8edc21..974ede2 100644 --- a/NeoTermBridge/build.gradle +++ b/NeoTermBridge/build.gradle @@ -5,33 +5,27 @@ def libraryVersionName = "1.0" android { compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION - buildToolsVersion '28.0.3' defaultConfig { minSdkVersion rootProject.ext.android.MIN_SDK_VERSION targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION versionCode libraryVersionCode versionName libraryVersionName - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - } buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.appcompat:appcompat:1.2.0' androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) testImplementation rootProject.ext.deps["junit"] } - -apply from: 'bintray.gradle' diff --git a/NeoTermBridge/proguard-rules.pro b/NeoTermBridge/proguard-rules.pro deleted file mode 100644 index f1b4245..0000000 --- a/NeoTermBridge/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/NeoTermBridge/src/androidTest/java/io/neoterm/bridge/ExampleInstrumentedTest.java b/NeoTermBridge/src/androidTest/java/io/neoterm/bridge/ExampleInstrumentedTest.java deleted file mode 100644 index 4a2741e..0000000 --- a/NeoTermBridge/src/androidTest/java/io/neoterm/bridge/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package io.neoterm.bridge; - -import android.content.Context; -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("io.neoterm.bridge.test", appContext.getPackageName()); - } -} diff --git a/NeoTermBridgeExample/.gitignore b/NeoTermBridgeExample/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/NeoTermBridgeExample/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/NeoTermBridgeExample/build.gradle b/NeoTermBridgeExample/build.gradle deleted file mode 100644 index fa6b705..0000000 --- a/NeoTermBridgeExample/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 28 - - - - defaultConfig { - applicationId "io.neoterm.bridge.example" - minSdkVersion 21 - targetSdkVersion 28 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' - implementation project(':NeoTermBridge') -} diff --git a/NeoTermBridgeExample/proguard-rules.pro b/NeoTermBridgeExample/proguard-rules.pro deleted file mode 100644 index f1b4245..0000000 --- a/NeoTermBridgeExample/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/NeoTermBridgeExample/src/androidTest/java/io/neoterm/bridge/example/ExampleInstrumentedTest.java b/NeoTermBridgeExample/src/androidTest/java/io/neoterm/bridge/example/ExampleInstrumentedTest.java deleted file mode 100644 index 51e42c0..0000000 --- a/NeoTermBridgeExample/src/androidTest/java/io/neoterm/bridge/example/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package io.neoterm.bridge.example; - -import android.content.Context; -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("io.neoterm.bridge.example", appContext.getPackageName()); - } -} diff --git a/NeoTermBridgeExample/src/main/AndroidManifest.xml b/NeoTermBridgeExample/src/main/AndroidManifest.xml deleted file mode 100644 index 1a94d0e..0000000 --- a/NeoTermBridgeExample/src/main/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NeoTermBridgeExample/src/main/java/io/neoterm/bridge/example/MainActivity.java b/NeoTermBridgeExample/src/main/java/io/neoterm/bridge/example/MainActivity.java deleted file mode 100644 index e6356bd..0000000 --- a/NeoTermBridgeExample/src/main/java/io/neoterm/bridge/example/MainActivity.java +++ /dev/null @@ -1,70 +0,0 @@ -package io.neoterm.bridge.example; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.view.View; -import android.widget.Toast; - -import io.neoterm.bridge.Bridge; -import io.neoterm.bridge.SessionId; - -public class MainActivity extends Activity { - - private static final int REQUEST_CODE_RUN = 1; - private static final int REQUEST_CODE_APPEND = 2; - private static final int REQUEST_CODE_APPEND_SILENTLY = 3; - private static final String COMMAND = "echo \"hello world\""; - - private SessionId lastSessionId; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } - - public void onRunHelloWorld(View view) { - Intent intent = Bridge.createExecuteIntent(COMMAND); - startActivityForResult(intent, REQUEST_CODE_RUN); - } - - public void onAppendHelloWorld(View view) { - if (lastSessionId == null) { - Toast.makeText(this, "Please run at least once", - Toast.LENGTH_SHORT).show(); - } - - Intent intent = Bridge.createExecuteIntent(lastSessionId, COMMAND); - startActivityForResult(intent, REQUEST_CODE_APPEND); - } - - public void onAppendHelloWorldSilently(View view) { - if (lastSessionId == null) { - Toast.makeText(this, "Please run at least once", - Toast.LENGTH_SHORT).show(); - } - Intent intent = Bridge.createExecuteIntent(lastSessionId, COMMAND, false); - startActivityForResult(intent, REQUEST_CODE_APPEND_SILENTLY); - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if (resultCode != RESULT_OK) { - Toast.makeText(this, "Failed", Toast.LENGTH_SHORT).show(); - return; - } - - switch (requestCode) { - case REQUEST_CODE_RUN: - lastSessionId = Bridge.parseResult(data); - break; - case REQUEST_CODE_APPEND: - Toast.makeText(this, "appended to " + lastSessionId.toString(), Toast.LENGTH_SHORT).show(); - break; - case REQUEST_CODE_APPEND_SILENTLY: - Toast.makeText(this, "appended silently to " + lastSessionId.toString(), Toast.LENGTH_SHORT).show(); - break; - } - } -} diff --git a/NeoTermBridgeExample/src/main/res/drawable-v24/ic_launcher_foreground.xml b/NeoTermBridgeExample/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 1f6bb29..0000000 --- a/NeoTermBridgeExample/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/NeoTermBridgeExample/src/main/res/drawable/ic_launcher_background.xml b/NeoTermBridgeExample/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 0d025f9..0000000 --- a/NeoTermBridgeExample/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NeoTermBridgeExample/src/main/res/layout/activity_main.xml b/NeoTermBridgeExample/src/main/res/layout/activity_main.xml deleted file mode 100644 index 36c067f..0000000 --- a/NeoTermBridgeExample/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - -