Skip to content

Commit

Permalink
2.3.7
Browse files Browse the repository at this point in the history
Signed-off-by: androidacy-user <opensource@androidacy.com>
  • Loading branch information
androidacy-user committed Mar 17, 2024
1 parent c537583 commit 7b627cf
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 73 deletions.
16 changes: 8 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
id("com.mikepenz.aboutlibraries.plugin")
kotlin("android")
kotlin("kapt")
id("com.google.devtools.ksp") version "1.9.10-1.0.13"
id("com.google.devtools.ksp") version "1.9.23-1.0.19"
}
android {
// functions to get git info: gitCommitHash, gitBranch, gitRemote
Expand Down Expand Up @@ -48,8 +48,8 @@ android {
applicationId = "com.fox2code.mmm"
minSdk = 26
targetSdk = 34
versionCode = 91
versionName = "2.3.6"
versionCode = 92
versionName = "2.3.7"
vectorDrawables {
useSupportLibrary = true
}
Expand Down Expand Up @@ -100,7 +100,7 @@ android {
// Specifies a list of ABIs for Gradle to create APKs for.
include("x86", "x86_64", "arm64-v8a", "armeabi-v7a")

isUniversalApk = false
isUniversalApk = true
}
}

Expand Down Expand Up @@ -372,9 +372,9 @@ dependencies {
// logging interceptor
debugImplementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.12")
// Chromium cronet from androidacy
implementation("org.chromium.net:cronet-embedded:113.5672.61")
implementation("org.chromium.net:cronet-embedded:119.6045.31")

val libsuVersion = "5.2.1"
val libsuVersion = "5.2.2"
// The core module that provides APIs to a shell
implementation("com.github.topjohnwu.libsu:core:${libsuVersion}")

Expand Down Expand Up @@ -406,10 +406,10 @@ dependencies {

// some utils
implementation("commons-io:commons-io:2.15.1")
implementation("org.apache.commons:commons-compress:1.26.0")
implementation("org.apache.commons:commons-compress:1.26.1")

// analytics
implementation("ly.count.android:sdk:23.8.4")
implementation("ly.count.android:sdk:24.1.1")

// annotations
implementation("org.jetbrains:annotations-java5:24.1.0")
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/fox2code/mmm/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class MainApplication : Application(), Configuration.Provider, ActivityLifecycle
} else {
val config = CountlyConfig(
this,
"ff1dc022295f64a7a5f6a5ca07c0294400c71b60",
"25145081ac0b5e2beb1e9320ab714285a45ad2d3",
"https://ctly.androidacy.com"
)
if (isCrashReportingEnabled) {
Expand Down
44 changes: 6 additions & 38 deletions app/src/main/kotlin/com/fox2code/mmm/utils/io/net/Http.kt
Original file line number Diff line number Diff line change
Expand Up @@ -254,35 +254,14 @@ enum class Http {;
val httpclientBuilder = OkHttpClient.Builder()
// Default is 10, extend it a bit for slow mobile connections.
httpclientBuilder.connectTimeout(5, TimeUnit.SECONDS)
httpclientBuilder.writeTimeout(10, TimeUnit.SECONDS)
httpclientBuilder.readTimeout(15, TimeUnit.SECONDS)
httpclientBuilder.writeTimeout(5, TimeUnit.SECONDS)
httpclientBuilder.readTimeout(5, TimeUnit.SECONDS)
httpclientBuilder.proxy(Proxy.NO_PROXY) // Do not use system proxy
var dns = Dns.SYSTEM
// TODO: Make compatible w/ cronet
// var dns = Dns.SYSTEM
try {
val cloudflareBootstrap = arrayOf(
InetAddress.getByName("162.159.36.1"),
InetAddress.getByName("162.159.46.1"),
InetAddress.getByName("1.1.1.1"),
InetAddress.getByName("1.0.0.1"),
InetAddress.getByName("162.159.132.53"),
InetAddress.getByName("2606:4700:4700::1111"),
InetAddress.getByName("2606:4700:4700::1001"),
InetAddress.getByName("2606:4700:4700::0064"),
InetAddress.getByName("2606:4700:4700::6400")
)
dns = Dns { s: String? ->
if ("cloudflare-dns.com" == s) {
return@Dns listOf<InetAddress>(*cloudflareBootstrap)
}
Dns.SYSTEM.lookup(s!!)
}
httpclientBuilder.dns(dns)
val cookieJar = WebkitCookieManagerProxy()
httpclientBuilder.cookieJar(cookieJar)
dns = DnsOverHttps.Builder().client(httpclientBuilder.build())
.url("https://cloudflare-dns.com/dns-query".toHttpUrl()).bootstrapDnsHosts(
*cloudflareBootstrap
).build()
} catch (e: UnknownHostException) {
Timber.e(e, "Failed to init DoH")
} catch (e: RuntimeException) {
Expand Down Expand Up @@ -381,7 +360,7 @@ enum class Http {;
// Gracefully fallback to okhttp
}
// Fallback DNS cache responses in case request fail but already succeeded once in the past
fallbackDNS = FallBackDNS(
/* fallbackDNS = FallBackDNS(
dns,
"github.com",
"api.github.com",
Expand All @@ -395,23 +374,12 @@ enum class Http {;
"api.androidacy.com",
"production-api.androidacy.com"
)
httpclientBuilder.dns(Dns.SYSTEM)
httpclientBuilder.dns(Dns.SYSTEM)*/
httpClient = followRedirects(httpclientBuilder, true).build()
followRedirects(httpclientBuilder, false).build()
httpclientBuilder.dns(fallbackDNS!!)
httpClientDoH = followRedirects(httpclientBuilder, true).build()
followRedirects(httpclientBuilder, false).build()
httpclientBuilder.cache(
Cache(
File(
mainApplication.cacheDir, "http_cache"
), 16L * 1024L * 1024L
)
) // 16Mib of cache
httpclientBuilder.dns(Dns.SYSTEM)
httpClientWithCache = followRedirects(httpclientBuilder, true).build()
httpclientBuilder.dns(fallbackDNS!!)
httpClientWithCacheDoH = followRedirects(httpclientBuilder, true).build()
if (MainApplication.forceDebugLogging) Timber.i("Initialized Http successfully!")
doh = MainApplication.isDohEnabled
}
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/res/raw/gh_main_crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIID0zCCArugAwIBAgIQVmcdBOpPmUxvEIFHWdJ1lDANBgkqhkiG9w0BAQwFADB7
MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD
VQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UE
AwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTE5MDMxMjAwMDAwMFoXDTI4
MTIzMTIzNTk1OVowgYgx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ICATE-----
7 changes: 6 additions & 1 deletion app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
</domain-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">github.com</domain>
<trust-anchors>
<certificates src="@raw/gh_main_crt" />
</trust-anchors>
</domain-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">githubusercontent.com</domain>
<trust-anchors>
<certificates src="@raw/gh_root_ca" />
Expand All @@ -34,4 +39,4 @@
<certificates src="@raw/sentry_io_root_ca" />
</trust-anchors>
</domain-config>
</network-security-config>
</network-security-config>
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath("com.android.tools.build:gradle:8.2.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
classpath("com.android.tools.build:gradle:8.3.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:11.1.0")
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# org.gradle.parallel=true
#Tue Jul 18 21:42:11 EDT 2023
#android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.enableJetifier=false
android.enableR8.fullMode=true
android.useAndroidX=true
org.gradle.caching=true
org.gradle.configuration-cache=false # temporarily disabled due to https://github.com/getsentry/sentry-android-gradle-plugin/issues/554
org.gradle.configuration-cache.problems=warn
org.gradle.jvmargs=-Xmx1536M -Dorg.gradle.android.cache-fix.ignoreVersionCheck\=true -Dkotlin.daemon.jvm.options\="-Xmx1536M" -Dfile.encoding\=UTF-8 -XX\:+UseParallelGC -XX\:ReservedCodeCacheSize\=768m
org.gradle.parallel=true
org.gradle.parallel=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Mon Jul 03 11:59:05 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down

0 comments on commit 7b627cf

Please sign in to comment.