diff --git a/README.md b/README.md index 469ae98..75e8a6f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ -# Termux:Float +# InVx:Float -[![Build status](https://github.com/termux/termux-float/workflows/Build/badge.svg)](https://github.com/termux/termux-float/actions) +> InVxTermux fork of [termux/termux-float](https://github.com/termux/termux-float). +> Package `com.involvex.termux_app.window`, `sharedUserId` `com.involvex.termux_app`. +> Install only alongside same-source InVxTermux APKs (matching test-key signature). +> Depends on `com.invapp:termux-shared/terminal-view:0.203.0` published locally from +> [involvex/termux-app](https://github.com/involvex/termux-app) via +> `./gradlew :terminal-view:publishReleasePublicationToMavenLocal :termux-shared:publishReleasePublicationToMavenLocal`. + +[![Build status](https://github.com/involvex/termux-float/workflows/Build/badge.svg)](https://github.com/involvex/termux-float/actions) [![Join the chat at https://gitter.im/termux/termux](https://badges.gitter.im/termux/termux.svg)](https://gitter.im/termux/termux) A [Termux] plugin app to show the terminal in a floating terminal window. diff --git a/app/build.gradle b/app/build.gradle index 432ba1f..cf3e6e7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'com.android.application' android { - namespace "com.termux.window" + namespace "com.invapp.window" compileSdk project.properties.compileSdkVersion.toInteger() def appVersionName = System.getenv("TERMUX_FLOAT_APP__BUILD__APP_VERSION_NAME") ?: "" def apkVersionTag = System.getenv("TERMUX_FLOAT_APP__BUILD__APK_VERSION_TAG") ?: "" defaultConfig { - applicationId "com.termux.window" + applicationId "com.involvex.termux_app.window" minSdk project.properties.minSdkVersion.toInteger() targetSdk project.properties.targetSdkVersion.toInteger() versionCode 1001 @@ -17,9 +17,9 @@ android { if (appVersionName) versionName = appVersionName validateVersionName(versionName) - manifestPlaceholders.TERMUX_PACKAGE_NAME = "com.termux" - manifestPlaceholders.TERMUX_APP_NAME = "Termux" - manifestPlaceholders.TERMUX_FLOAT_APP_NAME = "Termux:Float" + manifestPlaceholders.TERMUX_PACKAGE_NAME = "com.involvex.termux_app" + manifestPlaceholders.TERMUX_APP_NAME = "InVxTermux" + manifestPlaceholders.TERMUX_FLOAT_APP_NAME = "InVx:Float" } signingConfigs { @@ -35,12 +35,11 @@ android { release { minifyEnabled true shrinkResources false // Reproducible builds - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { signingConfig signingConfigs.debug - zipAlignEnabled true } } @@ -52,19 +51,26 @@ android { targetCompatibility JavaVersion.VERSION_11 } - applicationVariants.all { variant -> - variant.outputs.all { output -> - outputFileName = new File("termux-float-app_" + - (apkVersionTag ? apkVersionTag : "v" + versionName + "+" + variant.buildType.name) + ".apk") - } - } - packagingOptions { + jniLibs { + useLegacyPackaging true + } // Remove terminal-shared JNI libs added via termux-shared dependency exclude "lib/*/liblocal-socket.so" } } +androidComponents { + onVariants(selector().all(), { variant -> + def apkVersionTagLocal = System.getenv("TERMUX_FLOAT_APP__BUILD__APK_VERSION_TAG") ?: "" + variant.outputs.forEach { output -> + def buildTypeName = variant.buildType + def apkName = "invx-float-app_" + (apkVersionTagLocal ? apkVersionTagLocal : "v" + android.defaultConfig.versionName + "+" + buildTypeName) + ".apk" + output.outputFileName.set(apkName) + } + }) +} + dependencies { coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5" @@ -72,14 +78,13 @@ dependencies { implementation "androidx.annotation:annotation:1.9.1" - implementation "com.termux.termux-app:termux-shared:8aca6dbbf4" - implementation "com.termux.termux-app:terminal-view:8aca6dbbf4" - - // Use if below libraries are published locally by termux-app with `./gradlew publishReleasePublicationToMavenLocal` and used with `mavenLocal()`. - // If updates are done, republish there and sync project with gradle files here - // https://github.com/termux/termux-app/wiki/Termux-Libraries - //implementation "com.termux:termux-shared:0.118.0" - //implementation "com.termux:terminal-view:0.118.0" + // InVxTermux libraries published locally from involvex/termux-app with: + // ./gradlew :terminal-view:publishReleasePublicationToMavenLocal :termux-shared:publishReleasePublicationToMavenLocal + // Requires `mavenLocal()` in the root repositories block. Upstream used: + // implementation "com.termux.termux-app:termux-shared:8aca6dbbf4" + // implementation "com.termux.termux-app:terminal-view:8aca6dbbf4" + implementation "com.invapp:termux-shared:0.203.0" + implementation "com.invapp:terminal-view:0.203.0" implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b3aed65..2cc2933 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,7 +12,6 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8530161..286f0d4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,9 +1,9 @@ - - + + + ]> diff --git a/build.gradle b/build.gradle index 2452b6d..cb6a575 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:8.7.3" + classpath "com.android.tools.build:gradle:9.4.0" } } @@ -13,7 +13,7 @@ allprojects { repositories { mavenCentral() google() - //mavenLocal() + mavenLocal() // InVxTermux: com.invapp:termux-shared/terminal-view published from involvex/termux-app maven { url "https://jitpack.io" } } } diff --git a/gradle.properties b/gradle.properties index bff406b..e3fe40f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ android.useAndroidX=true minSdkVersion=24 targetSdkVersion=28 -compileSdkVersion=35 +compileSdkVersion=36 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2fa91c5..f0f17c3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists