diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c654e76..6ca37db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2020 microG Team +# SPDX-FileCopyrightText: 2026 microG Team # SPDX-License-Identifier: CC0-1.0 name: Build @@ -7,14 +7,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v7 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + + - uses: actions/setup-java@v5 with: - distribution: adopt + distribution: temurin java-version: 17 cache: gradle + - run: ./gradlew --no-daemon build env: TERM: dumb diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 46505ce..5897acb 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2020 microG Team +# SPDX-FileCopyrightText: 2026 microG Team # SPDX-License-Identifier: CC0-1.0 name: REUSE Compliance Check @@ -7,5 +7,5 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: fsfe/reuse-action@v1 + - uses: actions/checkout@v7 + - uses: fsfe/reuse-action@v6 diff --git a/.reuse/dep5 b/.reuse/dep5 index 5125149..83e1529 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -1,5 +1,5 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Files: services-framework-proxy/src/main/res/mipmap-*/*.png -Copyright: 2015 microG Project Team +Files: services-framework-proxy/src/main/res/mipmap-*/*.webp +Copyright: 2026 microG Project Team License: CC-BY-SA-4.0 diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 162548a..0000000 --- a/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2013 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -buildscript { - repositories { - mavenCentral() - google() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - } -} - -def versionCode() { - def stdout = new ByteArrayOutputStream() - exec { commandLine 'git', 'rev-list', '--count', "HEAD"; standardOutput = stdout } - return Integer.parseInt(stdout.toString().trim()) -} - -def versionName() { - def stdout = new ByteArrayOutputStream() - if (rootProject.file("gradlew").exists()) - exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout } - else // automatic build system, don't tag dirty - exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout } - return stdout.toString().trim().substring(1) -} - -allprojects { - apply plugin: 'idea' - version = versionName() - - ext.androidBuildVersionTools = "30.0.3" - - ext.appVersionCode = versionCode() - ext.androidCompileSdk = 30 - ext.androidTargetSdk = 24 - ext.androidMinSdk = 9 -} - -subprojects { - group = 'org.microg' - repositories { - mavenCentral() - google() - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..7b4a9eb --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + alias(libs.plugins.android.application) apply false +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..0a52593 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2026 microG Project Team +# SPDX-License-Identifier: Apache-2.0 + +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects +# org.gradle.parallel=true +# When enabled, the Configuration Cache allows Gradle to skip the configuration +# phase entirely if nothing that affects the build configuration (such as build scripts) +# has changed. Additionally, Gradle applies performance optimizations to task execution. +org.gradle.configuration-cache=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..1c27fb9 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2026 microG Project Team +# SPDX-License-Identifier: Apache-2.0 + +[versions] +agp = "9.2.1" + +[libraries] + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a7..8bdaf60 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6080eff..669e414 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,9 +1,11 @@ -# SPDX-FileCopyrightText: 2015, microG Project Team +# SPDX-FileCopyrightText: 2026, microG Project Team # SPDX-License-Identifier: CC0-1.0 +#Sun Jun 28 12:50:20 IST 2026 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index b8a3d3c..ef07e01 100755 --- a/gradlew +++ b/gradlew @@ -1,8 +1,7 @@ #!/bin/sh -# SPDX-License-Identifier: Apache-2.0 # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -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/. @@ -84,7 +85,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 -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -112,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -131,10 +133,13 @@ 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. @@ -142,7 +147,7 @@ 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 @@ -150,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | 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 @@ -199,16 +204,16 @@ 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, 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" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index eba6659..5eed7ee 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,4 +1,3 @@ -@rem SPDX-License-Identifier: Apache-2.0 @rem @rem Copyright 2015 the original author or authors. @rem @@ -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 ########################################################################## @@ -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 @@ -58,22 +59,22 @@ 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 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/services-framework-proxy/build.gradle b/services-framework-proxy/build.gradle deleted file mode 100644 index b468d66..0000000 --- a/services-framework-proxy/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2014 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.android.application' - -android { - namespace "com.google.android.gsf" - compileSdkVersion androidCompileSdk - buildToolsVersion "$androidBuildVersionTools" - - defaultConfig { - versionName version - versionCode appVersionCode - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -if (file('user.gradle').exists()) { - apply from: 'user.gradle' -} diff --git a/services-framework-proxy/build.gradle.kts b/services-framework-proxy/build.gradle.kts new file mode 100644 index 0000000..79825b6 --- /dev/null +++ b/services-framework-proxy/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * SPDX-FileCopyrightText: 2026 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "com.google.android.gsf" + compileSdk { + version = release(37) + } + + defaultConfig { + applicationId = "com.google.android.gsf" + minSdk = 18 + targetSdk = 37 + versionCode = 9 + versionName = "v0.1.1" + } + + buildTypes { + release { + isMinifyEnabled = true + isShrinkResources = true + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} diff --git a/services-framework-proxy/src/main/AndroidManifest.xml b/services-framework-proxy/src/main/AndroidManifest.xml index 283a7ce..d0db2a0 100644 --- a/services-framework-proxy/src/main/AndroidManifest.xml +++ b/services-framework-proxy/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ - - + + diff --git a/services-framework-proxy/src/main/java/org/microg/gms/gcm/PushRegisterProxy.java b/services-framework-proxy/src/main/java/org/microg/gms/gcm/PushRegisterProxy.java deleted file mode 100644 index 9483305..0000000 --- a/services-framework-proxy/src/main/java/org/microg/gms/gcm/PushRegisterProxy.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2013 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.gcm; - -import android.app.IntentService; -import android.content.Intent; - -public class PushRegisterProxy extends IntentService { - private static final String TAG = "GsfGcmRegisterProxy"; - - public PushRegisterProxy() { - super(TAG); - } - - @Override - protected void onHandleIntent(Intent intent) { - intent.setPackage("com.google.android.gms"); - startService(intent); - stopSelf(); - } -} diff --git a/services-framework-proxy/src/main/java/org/microg/gms/gcm/PushRegisterProxy.kt b/services-framework-proxy/src/main/java/org/microg/gms/gcm/PushRegisterProxy.kt new file mode 100644 index 0000000..7c706bb --- /dev/null +++ b/services-framework-proxy/src/main/java/org/microg/gms/gcm/PushRegisterProxy.kt @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: 2026 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package org.microg.gms.gcm + +import android.app.IntentService +import android.content.Intent + +class PushRegisterProxy : IntentService(TAG) { + + @Deprecated("Deprecated in Java") + override fun onHandleIntent(intent: Intent?) { + intent?.setPackage(GMS_PACKAGE_NAME) + startService(intent) + stopSelf() + } + + companion object { + private const val TAG = "GsfGcmRegisterProxy" + private const val GMS_PACKAGE_NAME = "com.google.android.gms" + } +} diff --git a/services-framework-proxy/src/main/res/mipmap-hdpi/ic_core_service_app.png b/services-framework-proxy/src/main/res/mipmap-hdpi/ic_core_service_app.png deleted file mode 100644 index 47a7303..0000000 Binary files a/services-framework-proxy/src/main/res/mipmap-hdpi/ic_core_service_app.png and /dev/null differ diff --git a/services-framework-proxy/src/main/res/mipmap-hdpi/ic_core_service_app.webp b/services-framework-proxy/src/main/res/mipmap-hdpi/ic_core_service_app.webp new file mode 100644 index 0000000..fafd99b Binary files /dev/null and b/services-framework-proxy/src/main/res/mipmap-hdpi/ic_core_service_app.webp differ diff --git a/services-framework-proxy/src/main/res/mipmap-mdpi/ic_core_service_app.png b/services-framework-proxy/src/main/res/mipmap-mdpi/ic_core_service_app.png deleted file mode 100644 index 7f96966..0000000 Binary files a/services-framework-proxy/src/main/res/mipmap-mdpi/ic_core_service_app.png and /dev/null differ diff --git a/services-framework-proxy/src/main/res/mipmap-mdpi/ic_core_service_app.webp b/services-framework-proxy/src/main/res/mipmap-mdpi/ic_core_service_app.webp new file mode 100644 index 0000000..877ad2a Binary files /dev/null and b/services-framework-proxy/src/main/res/mipmap-mdpi/ic_core_service_app.webp differ diff --git a/services-framework-proxy/src/main/res/mipmap-xhdpi/ic_core_service_app.png b/services-framework-proxy/src/main/res/mipmap-xhdpi/ic_core_service_app.png deleted file mode 100644 index dc1da20..0000000 Binary files a/services-framework-proxy/src/main/res/mipmap-xhdpi/ic_core_service_app.png and /dev/null differ diff --git a/services-framework-proxy/src/main/res/mipmap-xhdpi/ic_core_service_app.webp b/services-framework-proxy/src/main/res/mipmap-xhdpi/ic_core_service_app.webp new file mode 100644 index 0000000..5be6cc2 Binary files /dev/null and b/services-framework-proxy/src/main/res/mipmap-xhdpi/ic_core_service_app.webp differ diff --git a/services-framework-proxy/src/main/res/mipmap-xxhdpi/ic_core_service_app.png b/services-framework-proxy/src/main/res/mipmap-xxhdpi/ic_core_service_app.png deleted file mode 100644 index 0aaee7b..0000000 Binary files a/services-framework-proxy/src/main/res/mipmap-xxhdpi/ic_core_service_app.png and /dev/null differ diff --git a/services-framework-proxy/src/main/res/mipmap-xxhdpi/ic_core_service_app.webp b/services-framework-proxy/src/main/res/mipmap-xxhdpi/ic_core_service_app.webp new file mode 100644 index 0000000..70c4a38 Binary files /dev/null and b/services-framework-proxy/src/main/res/mipmap-xxhdpi/ic_core_service_app.webp differ diff --git a/services-framework-proxy/src/main/res/mipmap-xxxhdpi/ic_core_service_app.png b/services-framework-proxy/src/main/res/mipmap-xxxhdpi/ic_core_service_app.png deleted file mode 100644 index 9bb6351..0000000 Binary files a/services-framework-proxy/src/main/res/mipmap-xxxhdpi/ic_core_service_app.png and /dev/null differ diff --git a/services-framework-proxy/src/main/res/mipmap-xxxhdpi/ic_core_service_app.webp b/services-framework-proxy/src/main/res/mipmap-xxxhdpi/ic_core_service_app.webp new file mode 100644 index 0000000..a6443b5 Binary files /dev/null and b/services-framework-proxy/src/main/res/mipmap-xxxhdpi/ic_core_service_app.webp differ diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 4685da2..0000000 --- a/settings.gradle +++ /dev/null @@ -1,6 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -include ':services-framework-proxy' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..d70a392 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,29 @@ +/* + * SPDX-FileCopyrightText: 2026 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +pluginManagement { + repositories { + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "microG Services Framework Proxy" +include(":services-framework-proxy")