Skip to content

Commit

Permalink
Bump GMS version to 24.47.38 & Update gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
AykhanUV committed Dec 23, 2024
1 parent 3a7bb6d commit 89a09ab
Show file tree
Hide file tree
Showing 148 changed files with 1,561 additions and 953 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ local.properties
.project
*.apk
play-services-core/default/release/
/.kotlin

.DS_Store
/captures
.externalNativeBuild
.cxx
package.properties
66 changes: 33 additions & 33 deletions Images/Banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ buildscript {
ext.applicationNamespace = "com.google.android.gms"
ext.basePackageName = "app.revanced"

ext.annotationVersion = '1.8.2'
ext.annotationVersion = '1.9.1'
ext.appcompatVersion = '1.7.0'
ext.biometricVersion = '1.1.0'
ext.coreVersion = '1.13.1'
ext.fragmentVersion = '1.8.2'
ext.lifecycleVersion = '2.8.4'
ext.coreVersion = '1.15.0'
ext.fragmentVersion = '1.8.5'
ext.lifecycleVersion = '2.8.7'
ext.loaderVersion = '1.1.0'
ext.materialVersion = '1.12.0'
ext.mediarouterVersion = '1.7.0'
ext.multidexVersion = '2.0.1'
ext.navigationVersion = '2.7.7'
ext.navigationVersion = '2.8.4'
ext.preferenceVersion = '1.2.1'
ext.recyclerviewVersion = '1.3.2'
ext.webkitVersion = '1.11.0'
ext.webkitVersion = '1.12.1'

ext.coroutineVersion = '1.8.1'
ext.kotlinVersion = '2.0.0'
ext.kotlinVersion = '2.1.0'

ext.cronetVersion = '119.6045.31'
ext.okhttpVersion = '4.12.0'
ext.slf4jVersion = '2.0.16'
ext.volleyVersion = '1.2.1'
ext.wearableVersion = '0.1.1'
ext.wireVersion = '5.0.0'
ext.wireVersion = '5.1.0'

ext.androidBuildGradleVersion = '8.5.1'
ext.androidBuildGradleVersion = '8.7.3'

ext.androidBuildVersionTools = '34.0.0'

Expand Down Expand Up @@ -82,10 +82,10 @@ allprojects {
apply plugin: 'idea'

group = 'org.microg.gms'
ext.appVersionName = 5.9
ext.appVersionCode = 243864000
ext.appVersionName = 2.5
ext.appVersionCode = 244738000
ext.baseVersion = ext.appVersionCode.toString()[0..1] + '.' + ext.appVersionCode.toString()[2..3] + '.' + ext.appVersionCode.toString()[4..5]
version = ext.appVersionName+" GMS-"+ext.baseVersion.replaceAll("\\.", "")
version = ext.appVersionName + " GMS-" + ext.baseVersion
ext.isReleaseVersion = false
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 21 additions & 14 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh

# SPDX-License-Identifier: Apache-2.0
#
# Copyright © 2015-2021 the original authors.
#
Expand All @@ -16,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -56,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,10 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -134,26 +134,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 +201,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# 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.

# 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, 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
23 changes: 12 additions & 11 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@rem SPDX-License-Identifier: Apache-2.0
@rem
@rem Copyright 2015 the original author or authors.
@rem
Expand All @@ -14,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -44,11 +45,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 @@ -58,11 +59,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
1 change: 0 additions & 1 deletion play-services-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ android {
}

defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
Expand Down
2 changes: 1 addition & 1 deletion play-services-auth-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ android {
}

defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
Expand All @@ -35,6 +34,7 @@ description = 'microG implementation of play-services-auth-base'

dependencies {
// Dependencies from play-services-auth-base:18.0.6
//noinspection GradleDependency
api "androidx.collection:collection:1.0.0"
api project(':play-services-basement')
api project(':play-services-base')
Expand Down
3 changes: 2 additions & 1 deletion play-services-auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ android {
}

defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
Expand All @@ -35,7 +34,9 @@ description = 'microG implementation of play-services-auth'

dependencies {
// Dependencies from play-services-auth:20.4.0
//noinspection OutdatedLibrary
api "androidx.fragment:fragment:1.0.0"
//noinspection GradleDependency
api "androidx.loader:loader:1.0.0"
api project(':play-services-auth-base')
api project(':play-services-base')
Expand Down
4 changes: 3 additions & 1 deletion play-services-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ android {
}

defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk

Expand All @@ -53,8 +52,11 @@ description = 'microG implementation of play-services-base'

dependencies {
// Dependencies from play-services-base:18.1.0
//noinspection GradleDependency
api "androidx.collection:collection:1.0.0"
//noinspection GradleDependency
api "androidx.core:core:1.2.0"
//noinspection OutdatedLibrary
api "androidx.fragment:fragment:1.0.0"
api project(':play-services-basement')
api project(':play-services-tasks')
Expand Down
4 changes: 4 additions & 0 deletions play-services-base/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ dependencies {

implementation "androidx.annotation:annotation:$annotationVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
//noinspection GradleDependency
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
//noinspection GradleDependency
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
//noinspection GradleDependency
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "com.google.android.material:material:$materialVersion"
Expand All @@ -37,6 +40,7 @@ android {
}

buildFeatures {
//noinspection DataBindingWithoutKapt
dataBinding = true
buildConfig true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
package org.microg.gms.common;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.Notification.Action;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.net.Uri;
import android.os.PowerManager;
import android.provider.Settings;
import android.util.Log;

import androidx.annotation.RequiresApi;

import org.microg.gms.base.core.R;

import static android.os.Build.VERSION.SDK_INT;
import static android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS;

public class ForegroundServiceContext extends ContextWrapper {
private static final String TAG = "ForegroundService";
Expand Down Expand Up @@ -84,22 +90,63 @@ public static void completeForegroundService(Service service, Intent intent, Str

@RequiresApi(26)
private static Notification buildForegroundNotification(Context context, String serviceName) {
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_NONE);
// Notification channel
String channelName = context.getString(R.string.foreground_service_notification_title);
NotificationChannel channel = new NotificationChannel("foreground-service", channelName, NotificationManager.IMPORTANCE_HIGH);
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
channel.setShowBadge(false);
channel.setVibrationPattern(new long[]{0});
context.getSystemService(NotificationManager.class).createNotificationChannel(channel);

// Title and text
String appTitle = context.getApplicationInfo().loadLabel(context.getPackageManager()).toString();
String notifyTitle = context.getString(R.string.foreground_service_notification_title);
String firstLine = context.getString(R.string.foreground_service_notification_text, serviceName);
String secondLine = context.getString(R.string.foreground_service_notification_big_text, appTitle);

// Open battery optimizations settings
@SuppressLint("BatteryLife") Intent batteryOptimizationIntent = new Intent(ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
.setData(Uri.parse("package:" + context.getPackageName()));

PendingIntent batteryPendingIntent = PendingIntent.getActivity(
context, 0, batteryOptimizationIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE
);

// Open notification settings in foreground service category
Intent notificationCategoryIntent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName())
.putExtra(Settings.EXTRA_CHANNEL_ID, "foreground-service");

PendingIntent notificationCategoryPendingIntent = PendingIntent.getActivity(
context, 1, notificationCategoryIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE
);

// Open settings activity when notification is tapped
Intent mainSettingsIntent = new Intent();
mainSettingsIntent.setClassName("app.revanced.android.gms", "org.microg.gms.ui.SettingsActivity");
mainSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);

PendingIntent mainSettingsPendingIntent = PendingIntent.getActivity(
context, 2, mainSettingsIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE
);

// Notification actions
Action batteryAction = new Action.Builder(R.drawable.ic_battery_action, context.getString(R.string.foreground_action_battery_optimization), batteryPendingIntent).build();
Action notificationAction = new Action.Builder(R.drawable.ic_notification_action, context.getString(R.string.foreground_action_notification_settings), notificationCategoryPendingIntent).build();

Log.d(TAG, notifyTitle + " // " + firstLine + " // " + secondLine);

return new Notification.Builder(context, channel.getId())
.setOngoing(true)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(notifyTitle)
.setContentText(firstLine)
.setStyle(new Notification.BigTextStyle().bigText(firstLine + "\n" + secondLine))
.setPriority(Notification.PRIORITY_HIGH)
.setShowWhen(false)
.setFullScreenIntent(notificationCategoryPendingIntent, true)
.setContentIntent(mainSettingsPendingIntent)
.addAction(batteryAction)
.addAction(notificationAction)
.build();
}

Expand Down
Loading

0 comments on commit 89a09ab

Please sign in to comment.