mirror of
https://github.com/transmission/transmission.git
synced 2026-02-15 07:26:49 +00:00
android patches for ndk (#6024)
* android patches for ndk
* Update libtransmission/file-capacity.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* TrMacros: Move common & android vars
* Build android in CI
* Use vcpkg packages for curl & openssl
* Update CI for android
* Fix ndkVersion used with gradle
* Restore actions triggers events
* CMakeLists: Remove cond where curl is not found
* Use vcpkg tag instead of commit hash
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* TrMacros.cmake: clean unused variables & add vcpkg cond
* Remove quotes around VcpkgAndroid inclusion
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* actions: split steps to install vcpkg packages
* Build for android arm64
* actions: add make-android condition
* Revert "Use vcpkg tag instead of commit hash"
This reverts commit 65819026b1.
* build.gradle: use cmake version 3.22.1
* actions: use vcpkg 2024.01.12
* actions: Add ninja-build dependency
---------
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a1160f1556
commit
7030b53e2e
69
android/build.gradle
Normal file
69
android/build.gradle
Normal file
@@ -0,0 +1,69 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:7.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "com.android.library"
|
||||
|
||||
|
||||
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
||||
|
||||
def getExtOrDefault(name) {
|
||||
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["Transmission_" + name]
|
||||
}
|
||||
|
||||
def getExtOrIntegerDefault(name) {
|
||||
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Transmission_" + name]).toInteger()
|
||||
}
|
||||
|
||||
android {
|
||||
ndkVersion getExtOrDefault("ndkVersion")
|
||||
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
||||
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
abiFilters "arm64-v8a"
|
||||
arguments "-DVCPKG_TARGET_ANDROID=ON", "-DWITH_CRYPTO=openssl"
|
||||
}
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version "3.22.1"
|
||||
path "../CMakeLists.txt"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable "GradleCompatible"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
prefab true
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
6
android/gradle.properties
Normal file
6
android/gradle.properties
Normal file
@@ -0,0 +1,6 @@
|
||||
Transmission_kotlinVersion=1.7.0
|
||||
# quotactl is defined from >= 26
|
||||
Transmission_minSdkVersion=26
|
||||
Transmission_targetSdkVersion=31
|
||||
Transmission_compileSdkVersion=31
|
||||
Transmission_ndkVersion=26.1.10909125
|
||||
6
android/src/main/AndroidManifest.xml
Normal file
6
android/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.transmissionbt.transmission">
|
||||
<application android:label="Transmission">
|
||||
</application>
|
||||
</manifest>
|
||||
Reference in New Issue
Block a user