Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contributor Covenant Code of Conduct

## Our Pledge

Originally, NeoTerm was designed as the front end of [Termux](https://github.com/termux/termux-app) to provide some
functions that Termux didn't have, but we found it very convenient. In continuous development, we discovered our goal:
to be the best terminal for Android. In the interest of fostering an open and welcoming environment, we as contributors
and maintainers pledge to making participation in our project and our community a harassment-free experience for
everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Free for forever

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
kiva515@foxmail.com. The project team will review and investigate all complaints, and will respond in a way that it
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org

[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# How to

This is a free software, so any contributions and any contribution types are welcomed!
NeoTerm is a free software, so any contributions and any contribution types are welcomed!

22 changes: 13 additions & 9 deletions NeoLang/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
apply plugin: 'java-library'
apply plugin: 'kotlin'

repositories {
mavenCentral()
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.deps["kotlin-stdlib"]
}

java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath rootProject.ext.deps["kotlin-gradle-plugin"]
}
}
repositories {
mavenCentral()
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
Expand All @@ -20,9 +27,6 @@ compileTestKotlin {
jvmTarget = "1.8"
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.deps["kotlin-stdlib"]
testImplementation rootProject.ext.deps["junit"]
}
15 changes: 9 additions & 6 deletions NeoTermBridge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@ def libraryVersionCode = 1
def libraryVersionName = "1.0"

android {
namespace "io.neoterm.bridge"
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION

defaultConfig {
minSdkVersion rootProject.ext.android.MIN_SDK_VERSION
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
versionCode libraryVersionCode
versionName libraryVersionName
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

buildTypes {
release {
minifyEnabled false
}
}
namespace 'io.neoterm.bridge'
buildFeatures {
aidl true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.7.1'
androidTestImplementation('androidx.test.espresso:espresso-core:3.7.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"]
}
3 changes: 1 addition & 2 deletions NeoTermBridge/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest
package="io.neoterm.bridge"/>
<manifest />
15 changes: 6 additions & 9 deletions Xorg/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
apply plugin: 'com.android.library'

android {
namespace "io.neoterm.xorg"
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION

defaultConfig {
minSdkVersion rootProject.ext.android.MIN_SDK_VERSION
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

buildTypes {
Expand All @@ -23,16 +20,16 @@ android {
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
lintOptions {
disable 'MissingPermission', 'MissingSuperCall', 'UnsafeDynamicallyLoadedCode'
}
namespace 'io.neoterm.xorg'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.7.1'
implementation rootProject.ext.deps["appcompat-v7"]
testImplementation rootProject.ext.deps["junit"]

androidTestImplementation('androidx.test.espresso:espresso-core:3.7.0')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
3 changes: 1 addition & 2 deletions Xorg/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest
package="io.neoterm.xorg"/>
<manifest />
49 changes: 29 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,75 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
namespace "io.neoterm"
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION
compileSdk rootProject.ext.android.COMPILE_SDK_VERSION
ndkVersion "21.4.7075529"

defaultConfig {
applicationId "io.neoterm"
minSdkVersion rootProject.ext.android.MIN_SDK_VERSION
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
minSdk rootProject.ext.android.MIN_SDK_VERSION
targetSdk rootProject.ext.android.TARGET_SDK_VERSION
versionCode 38
versionName "2.0.5"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resConfigs "zh-rCN", "zh-rTW"
resourceConfigurations += ['zh-rCN', 'zh-rTW']
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
abiFilters 'arm64-v8a'
}
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
}
buildTypes {
release {
minifyEnabled true
zipAlignEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
lintOptions {
abortOnError false
checkReleaseBuilds false
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xallow-result-return-type"]
}
namespace 'io.neoterm'
lint {
abortOnError false
checkReleaseBuilds false
}
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation rootProject.ext.deps["junit"]
androidTestImplementation project(path: ':NeoLang')

implementation rootProject.ext.deps["kotlin-stdlib"]

implementation 'org.greenrobot:eventbus:3.3.1'

implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'

implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'
implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'com.github.GrenderG:Color-O-Matic:1.1.5'
implementation 'androidx.annotation:annotation:1.7.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.appcompat:appcompat-resources:1.6.1'

implementation project(':chrome-tabs')
implementation project(':NeoLang')
Expand Down
16 changes: 11 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.neoterm">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-feature
android:name="android.hardware.touchscreen"
Expand All @@ -16,12 +15,13 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

<application
android:name=".App"
android:allowBackup="true"
android:banner="@drawable/banner"
android:extractNativeLibs="true"
android:fullBackupContent="@xml/backup_config"
android:icon="@mipmap/ic_launcher_neoterm_round"
android:label="@string/app_name"
Expand All @@ -30,6 +30,11 @@
android:roundIcon="@mipmap/ic_launcher_neoterm_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Terminal emulator and background shell sessions." />

<activity
android:name=".ui.term.NeoTermActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
Expand All @@ -54,6 +59,7 @@

<activity-alias
android:name=".NeoLotMainActivity"
android:exported="true"
android:targetActivity="io.neoterm.ui.term.NeoTermActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down Expand Up @@ -138,7 +144,7 @@
<activity
android:name=".ui.other.SetupActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".ui.other.BonusActivity"
Expand Down Expand Up @@ -176,7 +182,7 @@
<service
android:name=".services.NeoTermService"
android:enabled="true"
android:exported="false"/>
android:foregroundServiceType="specialUse" />

<meta-data
android:name="com.sec.android.support.multiwindow"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/neoterm/component/colorscheme/comp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ColorSchemeComponent : ConfigFileBasedComponent<NeoColorScheme>(NeoTermPat

fun getCurrentColorSchemeName(): String {
var currentColorName =
NeoPreference.loadString(R.string.key_customization_color_scheme, DefaultColorScheme.colorName)
NeoPreference.loadString(R.string.key_customization_color_scheme, DefaultColorScheme.colorName) ?: DefaultColorScheme.colorName
if (!colors.containsKey(currentColorName)) {
currentColorName = DefaultColorScheme.colorName
NeoPreference.store(R.string.key_customization_color_scheme, DefaultColorScheme.colorName)
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/io/neoterm/component/config/comp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ object NeoPreference {
return loadInt(App.get().getString(key), defaultValue)
}

fun loadString(key: Int, defaultValue: String?): String {
fun loadString(key: Int, defaultValue: String?): String? {
return loadString(App.get().getString(key), defaultValue)
}

Expand All @@ -126,7 +126,7 @@ object NeoPreference {
return preference!!.getInt(key, defaultValue)
}

fun loadString(key: String?, defaultValue: String?): String {
fun loadString(key: String?, defaultValue: String?): String? {
return preference!!.getString(key, defaultValue)
}

Expand Down Expand Up @@ -161,7 +161,7 @@ object NeoPreference {
}

fun getLoginShellName(): String {
return loadString(R.string.key_general_shell, DefaultValues.loginShell)
return loadString(R.string.key_general_shell, DefaultValues.loginShell) ?: DefaultValues.loginShell
}

fun getLoginShellPath(): String {
Expand Down Expand Up @@ -216,7 +216,7 @@ object NeoPreference {
return loadString(
R.string.key_general_initial_command,
DefaultValues.initialCommand
)
) ?: DefaultValues.initialCommand
}

fun isBellEnabled(): Boolean {
Expand Down
Loading