Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issues with Android Studio Dolphin and upgrade Gradle #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Gradle files
.gradle/
gradle/
build/
ndkBuild/
gradlew*

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof

# build output files
*.zip
*.jar
4 changes: 2 additions & 2 deletions braille/translate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ dependencies {
}

task createTranslationTablesZip(type: Zip){
archiveName="translationtables.zip"
destinationDir = file('src/phone/res/raw/')
archiveFileName = "translationtables.zip"
destinationDirectory = file('src/phone/res/raw/')
from fileTree('./src/phone/tables/')
into('liblouis/tables')
}
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,29 @@ dependencies {

buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'org.aspectj:aspectjtools:1.8.1'
classpath 'com.android.tools.build:gradle:3.5.4'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}

android {
buildToolsVersion '29.0.0'
defaultConfig {
applicationId talkbackApplicationId
versionName talkbackVersionName + "-" + BUILD_TIMESTAMP
manifestPlaceholders = [talkbackMainPermission:talkbackMainPermission]
minSdkVersion 26
targetSdkVersion 30
targetSdkVersion 33
testInstrumentationRunner 'android.test.InstrumentationTestRunner'
multiDexEnabled true
}
Expand All @@ -49,6 +48,7 @@ android {
checkReleaseBuilds false
abortOnError false
}
namespace 'com.android.talkback'
productFlavors {
phone {
dimension "target"
Expand Down
4 changes: 4 additions & 0 deletions compositor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apply plugin: 'com.android.library'
apply from: "../shared.gradle"

android {
namespace 'com.google.android.accessibility.compositor'
}

dependencies {
implementation project(':proguard')
implementation project(':uiunderstanding')
Expand Down
2 changes: 1 addition & 1 deletion compositor/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.google.android.accessibility.compositor" />
<manifest />
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ android.enableJetifier = true
org.gradle.jvmargs=-Xms512M -Xmx8G

## Prevents "Execution failed for JetifyTransform, failed to transform"
android.jetifier.blacklist=proguard.jar
android.jetifier.ignorelist=proguard.jar
4 changes: 1 addition & 3 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.talkback"
>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Strings with the format ${foo}, such as ${applicationId}, are called
placeholders, and they get replaced by the build system with the appropriate
Expand Down
2 changes: 2 additions & 0 deletions talkback/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ dependencies {
def talkbackMainPermission = '"com.android.talkback.permission.TALKBACK"'

android {

namespace 'com.google.android.accessibility.talkback'
defaultConfig {
buildConfigField("String", "TALKBACK_MAIN_PERMISSION", talkbackMainPermission)
}
Expand Down
3 changes: 1 addition & 2 deletions talkback/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.accessibility.talkback">
xmlns:tools="http://schemas.android.com/tools">

<!-- Strings with the format ${foo}, such as ${applicationId}, are called
placeholders, and they get replaced by the build system with the appropriate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static class FileUtil {
private static final String FILE_FOLDER_NAME = "Gesture";
private static final String FILE_NAME = "gesture.log";
private static final String FILE_AUTHORITY =
BuildConfig.APPLICATION_ID + ".providers.FileProvider";
BuildConfig.LIBRARY_PACKAGE_NAME + ".providers.FileProvider";

/** Writes gesture data into a file and return the file uri. */
public static Uri writeFile(Context context, Deque<GestureInfo> gestureInfos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class CustomLabelManager implements LabelManager, AccessibilityEventListe
public static final String EXTRA_STRING_ARRAY_PACKAGES = "EXTRA_STRING_ARRAY_PACKAGES";

@VisibleForTesting
static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".providers.LabelProvider";
static final String AUTHORITY = BuildConfig.LIBRARY_PACKAGE_NAME + ".providers.LabelProvider";

/**
* The substring separating a label's package and view ID name in a fully-qualified resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class LabelManagerSummaryActivity extends BasePreferencesActivity

/** File provider for custom label share intent. */
private static final String FILE_AUTHORITY =
BuildConfig.APPLICATION_ID + ".providers.FileProvider";
BuildConfig.LIBRARY_PACKAGE_NAME + ".providers.FileProvider";

private RecyclerView packageList;
private PackageLabelInfoAdapter packageLabelInfoAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class LabelProvider extends ContentProvider {

private static final String TAG = "LabelProvider";

public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".providers.LabelProvider";
public static final String AUTHORITY = BuildConfig.LIBRARY_PACKAGE_NAME + ".providers.LabelProvider";
static final String LABELS_PATH = "labels";
static final Uri LABELS_CONTENT_URI =
new Uri.Builder().scheme("content").authority(AUTHORITY).path(LABELS_PATH).build();
Expand Down
3 changes: 1 addition & 2 deletions talkback/src/wear/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.accessibility.talkback">
xmlns:tools="http://schemas.android.com/tools">

<uses-sdk
android:minSdkVersion="28"/>
Expand Down
3 changes: 3 additions & 0 deletions uiunderstanding/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apply plugin: 'com.android.library'
apply from: "../shared.gradle"

android {
namespace 'com.google.android.accessibility.uiunderstanding'
}
2 changes: 1 addition & 1 deletion uiunderstanding/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.google.android.accessibility.uiunderstanding" />
<manifest />
2 changes: 2 additions & 0 deletions utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ dependencies {
}

android {

namespace 'com.google.android.accessibility.utils'
defaultConfig {
buildConfigField("String", "TALKBACK_APPLICATION_ID", '"' + talkbackApplicationId + '"')
}
Expand Down
2 changes: 1 addition & 1 deletion utils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.google.android.accessibility.utils" />
<manifest />