Verified Commit 895c74d0 authored by Marvin W.'s avatar Marvin W. 🐿
Browse files

Huge merge/refactor/update

parent a5bfecee
[submodule "extern/UnifiedNlp"]
path = extern/UnifiedNlp
url = https://github.com/microg/android_packages_apps_UnifiedNlp.git
[submodule "extern/GmsApi"]
path = extern/GmsApi
url = https://github.com/microg/android_external_GmsApi.git
[submodule "extern/Wearable"]
path = extern/Wearable
url = https://github.com/microg/android_external_Wearable.git
[submodule "extern/GmsLib"]
path = extern/GmsLib
url = https://github.com/microg/android_external_GmsLib.git
[submodule "extern/RemoteDroidGuard"]
path = extern/RemoteDroidGuard
url = https://github.com/microg/android_packages_apps_RemoteDroidGuard.git
......@@ -10,7 +10,6 @@ android:
components:
- tools
- platform-tools
- build-tools-29.0.2
- android-27
- android-28
- build-tools-29.0.3
- android-29
- extra-android-m2repository
/*
* Copyright 2013-2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-FileCopyrightText: 2013, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
buildscript {
ext.kotlin_version = '1.3.21'
ext.nlpVersion = '2.0-alpha1'
ext.remoteDroidGuardVersion = '0.1.1'
ext.safeParcelVersion = '1.6.0'
ext.wearableVersion = '0.1.1'
ext.kotlinVersion = '1.3.72'
ext.coroutineVersion = '1.3.7'
ext.annotationVersion = '1.1.0'
ext.appcompatVersion = '1.1.0'
ext.fragmentVersion = '1.2.5'
ext.lifecycleVersion = '2.2.0'
ext.mediarouterVersion = '1.1.0'
ext.multidexVersion = '2.0.1'
ext.navigationVersion = '2.3.0'
ext.preferenceVersion = '1.1.1'
ext.recyclerviewVersion = '1.1.0'
ext.supportLibraryVersion = "28.0.0"
ext.slf4jVersion = "1.7.25"
ext.androidBuildGradleVersion = "3.6.3"
ext.androidBuildVersionTools = "29.0.3"
ext.androidMinSdk = 14
ext.androidTargetSdk = 29
ext.androidCompileSdk = 29
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.android.tools.build:gradle:$androidBuildGradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
def execResult(...args) {
def stdout = new ByteArrayOutputStream()
exec {
commandLine args
standardOutput = stdout
}
return stdout.toString().trim()
}
def gmsVersion = "19.4.20"
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').substring(1)
def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD"))
def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').split(' ')[0]
def gitDirty = execResult('git', 'status', '--porcelain').size() > 0
def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.'))
def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1))
def ourVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0)
def ourVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
logger.lifecycle('Starting build for version {} ({})...', ourVersionName, ourVersionCode)
@Deprecated
String getMyVersionName() {
return ourVersionName
}
@Deprecated
int getMyVersionCode() {
return ourVersionCode
}
allprojects {
apply plugin: 'idea'
ext.androidBuildVersionTools = "29.0.2"
ext.supportLibraryVersion = "28.0.0"
group = 'org.microg.gms'
version = ourVersionName
ext.appVersionCode = ourVersionCode
ext.isReleaseVersion = false
ext.slf4jVersion = "1.7.25"
}
def androidCompileSdk() { return 28 }
@Deprecated
def androidCompileSdk() { return androidCompileSdk }
def androidTargetSdk() { return 29 }
@Deprecated
def androidTargetSdk() { return androidTargetSdk }
def androidMinSdk() { return 14 }
@Deprecated
def androidMinSdk() { return androidMinSdk }
@Deprecated
def versionCode() {
def stdout = new ByteArrayOutputStream()
exec { commandLine 'git', 'rev-list', '--count', "HEAD"; standardOutput = stdout }
return Integer.parseInt(stdout.toString().trim())
return ourVersionCode
}
@Deprecated
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)
return ourVersionName
}
subprojects {
group = 'org.microg'
repositories {
jcenter()
google()
......
Subproject commit 2a43448e49dc0aec0d6c53c8a27dd58245fdaba6
Subproject commit 15cd4491bcca57d627796b35b69bdf8c97564792
Subproject commit 82479b79c76353f532e0c6edd0d1dee8d49c48f4
android.useAndroidX=true
......@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
......@@ -16,15 +16,6 @@
apply plugin: 'com.android.library'
String getMyVersionName() {
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)
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
......@@ -36,8 +27,8 @@ android {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
lintOptions {
......
......@@ -103,7 +103,6 @@ public abstract class AbstractAboutFragment extends Fragment {
}
List<Library> libraries = new ArrayList<Library>();
libraries.add(new Library(BuildConfig.APPLICATION_ID, getString(R.string.lib_name), getString(R.string.lib_license)));
collectLibraries(libraries);
Collections.sort(libraries);
((ListView) aboutRoot.findViewById(android.R.id.list)).setAdapter(new LibraryAdapter(getContext(), libraries.toArray(new Library[libraries.size()])));
......
......@@ -4,7 +4,6 @@ import android.os.Bundle;
import android.view.ViewGroup;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import java.util.ArrayList;
......@@ -22,8 +21,6 @@ public abstract class AbstractDashboardActivity extends AppCompatActivity {
setContentView(R.layout.dashboard_activity);
conditionContainer = (ViewGroup) findViewById(R.id.condition_container);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_wrapper, getFragment())
.commit();
......
......@@ -5,7 +5,6 @@ import android.view.MenuItem;
import android.view.ViewGroup;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
......@@ -20,8 +19,6 @@ public abstract class AbstractSettingsActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.settings_activity);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
if (showHomeAsUp) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
......
......@@ -19,8 +19,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar"/>
<LinearLayout
android:id="@+id/condition_container"
android:layout_width="match_parent"
......
......@@ -19,8 +19,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar"/>
<org.microg.tools.ui.SwitchBar
android:id="@+id/switch_bar"
android:layout_width="match_parent"
......
......@@ -38,7 +38,6 @@
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:background="@null"
android:theme="@style/Widget.AppCompat.Settings.SwitchBar.Switch"/>
android:background="@null"/>
</merge>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.AppCompat.Settings.Dashboard">
<item name="preferenceTheme">@style/SettingsDashboardThemeOverlay</item>
</style>
<style name="SettingsDashboardFragment" parent="@style/PreferenceFragment">
<item name="android:divider">@drawable/empty</item>
<item name="divider">@drawable/empty</item>
<item name="android:dividerHeight">0dip</item>
</style>
<style name="SettingsDashboardThemeOverlay" parent="@style/PreferenceThemeOverlay.v14.Material">
<item name="preferenceCategoryStyle">@style/SettingsDashboardCategory</item>
<item name="preferenceFragmentStyle">@style/SettingsDashboardFragment</item>
<item name="preferenceFragmentCompatStyle">@style/SettingsDashboardFragment</item>
<item name="colorAccent">#666666</item>
</style>
<style name="SettingsDashboardCategory">
<item name="android:layout">@layout/preference_category_dashboard</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2013-2017 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.AppCompat.Settings" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/settings_theme_primary</item>
<item name="colorPrimaryDark">@color/settings_theme_primary_dark</item>
<item name="colorAccent">@color/settings_theme_accent</item>
<item name="android:colorPrimary" tools:targetApi="21">@color/settings_theme_primary</item>
<item name="android:colorPrimaryDark" tools:targetApi="21">@color/settings_theme_primary_dark</item>
<item name="android:colorAccent" tools:targetApi="21">@color/settings_theme_accent</item>
</style>
<style name="Widget.AppCompat.Settings.SwitchBar.Switch" parent="Widget.AppCompat.CompoundButton.Switch">
<item name="colorAccent">@color/switch_accent_color</item>
<item name="android:colorAccent" tools:targetApi="21">@color/switch_accent_color</item>
</style>
<style name="Theme.AppCompat.Settings.Dashboard"/>
</resources>
......@@ -16,31 +16,19 @@
apply plugin: 'com.android.library'
String getMyVersionName() {
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)
}
group = 'org.microg'
version = getMyVersionName()
android {
compileSdkVersion androidCompileSdk()
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName getMyVersionName()
minSdkVersion androidMinSdk()
targetSdkVersion androidTargetSdk()
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
......
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
dependencies {
api project(':play-services-basement')
implementation "androidx.annotation:annotation:$annotationVersion"
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest package="org.microg.gms.base.core">
<application />
</manifest>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment