这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
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
16 changes: 11 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ ext {
}

android {
compileSdkVersion project.properties.compileSdkVersion.toInteger()
namespace "com.termux"
compileSdk 36

ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion
def appVersionName = System.getenv("TERMUX_APP_VERSION_NAME") ?: ""
def apkVersionTag = System.getenv("TERMUX_APK_VERSION_TAG") ?: ""
Expand All @@ -37,6 +39,10 @@ android {
implementation project(":termux-shared")
}

buildFeatures {
buildConfig = true
}

defaultConfig {
applicationId "com.termux"
minSdkVersion project.properties.minSdkVersion.toInteger()
Expand Down Expand Up @@ -110,9 +116,6 @@ android {
}
}

lintOptions {
disable 'ProtectedPermissions'
}

testOptions {
unitTests {
Expand All @@ -125,6 +128,9 @@ android {
useLegacyPackaging true
}
}
lint {
disable 'ProtectedPermissions'
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
Expand All @@ -143,7 +149,7 @@ android {
dependencies {
testImplementation "junit:junit:4.13.2"
testImplementation "org.robolectric:robolectric:4.10"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.5"
}

task versionName {
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.termux"
android:installLocation="internalOnly"
android:sharedUserId="${TERMUX_PACKAGE_NAME}"
android:sharedUserLabel="@string/shared_user_label">
Expand Down Expand Up @@ -42,7 +41,6 @@
android:name=".app.TermuxApplication"
android:allowBackup="false"
android:banner="@drawable/banner"
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/application_name"
android:requestLegacyExternalStorage="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ protected void onCreate(Bundle savedInstanceState) {
mWebView = new WebView(this);
WebSettings settings = mWebView.getSettings();
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setAppCacheEnabled(false);
setContentView(progressLayout);
mWebView.clearCache(true);

Expand Down
Binary file added app/src/main/res/raw/bell.ogg
Binary file not shown.
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,7 @@
<!-- Donate Preference -->
<string name="donate_preference_title">Donate</string>

<string name="action_yes">Yes</string>
<string name="action_no">No</string>

</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath 'com.android.tools.build:gradle:8.13.0'
}
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ org.gradle.jvmargs=-Xmx2048M \
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
android.useAndroidX=true

minSdkVersion=21
minSdkVersion=23
targetSdkVersion=28
ndkVersion=22.1.7171670
compileSdkVersion=30
ndkVersion=26.3.11579264
compileSdkVersion=36

markwonVersion=4.6.2

3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sat Oct 18 13:41:24 CEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdk:
- openjdk11
env:
JITPACK_NDK_VERSION: "21.1.6352462"
JITPACK_NDK_VERSION: "26.3.11579264"
17 changes: 9 additions & 8 deletions terminal-emulator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
namespace "com.termux.terminal"

compileSdkVersion project.properties.compileSdkVersion.toInteger()
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion

Expand Down Expand Up @@ -41,6 +43,12 @@ android {
testOptions {
unitTests.returnDefaultValues = true
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

tasks.withType(Test) {
Expand All @@ -54,21 +62,14 @@ dependencies {
testImplementation "junit:junit:4.13.2"
}

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
create("release", MavenPublication) {
from components.release
groupId = 'com.termux'
artifactId = 'terminal-emulator'
version = '0.118.0'
artifact(sourceJar)
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion terminal-emulator/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<manifest package="com.termux.terminal">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application />
</manifest>
35 changes: 16 additions & 19 deletions terminal-view/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
namespace "com.termux.view"
compileSdkVersion project.properties.compileSdkVersion.toInteger()

dependencies {
implementation "androidx.annotation:annotation:1.3.0"
api project(":terminal-emulator")
}

defaultConfig {
minSdkVersion project.properties.minSdkVersion.toInteger()
targetSdkVersion project.properties.targetSdkVersion.toInteger()
Expand All @@ -26,28 +22,29 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

dependencies {
implementation "androidx.annotation:annotation:1.3.0"
api project(":terminal-emulator")
testImplementation "junit:junit:4.13.2"
}

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
publishing {
publications {
create("release", MavenPublication) {
afterEvaluate {
from components.release
groupId = 'com.termux'
artifactId = 'terminal-view'
version = '0.118.0'
artifact(sourceJar)
}
groupId = 'com.termux'
artifactId = 'terminal-view'
version = '0.118.0'
}
}
}
3 changes: 2 additions & 1 deletion terminal-view/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<manifest package="com.termux.view">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application />
</manifest>
76 changes: 30 additions & 46 deletions termux-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,16 @@ apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
namespace "com.termux.shared"
compileSdkVersion project.properties.compileSdkVersion.toInteger()
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion

dependencies {
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.annotation:annotation:1.3.0"
implementation "androidx.core:core:1.6.0"
implementation "com.google.android.material:material:1.4.0"
implementation "com.google.guava:guava:24.1-jre"
implementation "io.noties.markwon:core:$markwonVersion"
implementation "io.noties.markwon:ext-strikethrough:$markwonVersion"
implementation "io.noties.markwon:linkify:$markwonVersion"
implementation "io.noties.markwon:recycler:$markwonVersion"
implementation "org.lsposed.hiddenapibypass:hiddenapibypass:6.1"

// Do not increment version higher than 1.0.0-alpha09 since it will break ViewUtils and needs to be looked into
// noinspection GradleDependency
implementation "androidx.window:window:1.0.0-alpha09"

// Do not increment version higher than 2.5 or there
// will be runtime exceptions on android < 8
// due to missing classes like java.nio.file.Path.
implementation "commons-io:commons-io:2.5"

implementation project(":terminal-view")

implementation "com.termux:termux-am-library:v2.0.0"
}

defaultConfig {
minSdkVersion project.properties.minSdkVersion.toInteger()
targetSdkVersion project.properties.targetSdkVersion.toInteger()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
ndkBuild {
cppFlags ''
}
ndkBuild { cppFlags '' }
}
}

Expand All @@ -50,41 +23,52 @@ android {
}

compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true

sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

externalNativeBuild {
ndkBuild {
path file('src/main/cpp/Android.mk')
ndkBuild { path file('src/main/cpp/Android.mk') }
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

dependencies {
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
}
implementation "androidx.appcompat:appcompat:1.7.1"
implementation "androidx.annotation:annotation:1.9.1"
implementation "androidx.core:core:1.17.0"
implementation "com.google.android.material:material:1.13.0"
implementation "com.google.guava:guava:33.5.0-jre"
implementation "io.noties.markwon:core:$markwonVersion"
implementation "io.noties.markwon:ext-strikethrough:$markwonVersion"
implementation "io.noties.markwon:linkify:$markwonVersion"
implementation "io.noties.markwon:recycler:$markwonVersion"
implementation "org.lsposed.hiddenapibypass:hiddenapibypass:6.1"
implementation "androidx.window:window:1.5.0"
implementation "commons-io:commons-io:2.20.0"
implementation project(":terminal-view")
implementation "com.termux:termux-am-library:v2.0.0"

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.3.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.7.0"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.5"
}

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
create("release", MavenPublication) {
from components.release
groupId = 'com.termux'
artifactId = 'termux-shared'
version = '0.118.0'
artifact(sourceJar)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions termux-shared/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.termux.shared">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void showMessage(Context context, String titleText, String message
final DialogInterface.OnClickListener onNegativeButton,
final DialogInterface.OnDismissListener onDismiss) {

AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.Theme_AppCompat_Light_Dialog);
AlertDialog.Builder builder = new AlertDialog.Builder(context, androidx.appcompat.R.style.Theme_AppCompat_Light_Dialog_Alert);

LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
View view = inflater.inflate(R.layout.dialog_show_message, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import java.nio.charset.Charset;

import javax.annotation.Nullable;
import androidx.annotation.Nullable;

public class ShareUtils {

Expand Down
Loading