Skip to content

Resolve build failures so repository will build with ./gradlew clean build #584

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

Open
wants to merge 7 commits into
base: main
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
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ jobs:
distribution: 'zulu'
java-version: '17'
- name: Build Compose
run: ./gradlew :compose:snippets:build
run: ./gradlew :compose:snippets:build --stacktrace
- name: Build recompose snippets
run: ./gradlew :compose:recomposehighlighter:build
run: ./gradlew :compose:recomposehighlighter:build --stacktrace
- name: Build kotlin snippets
run: ./gradlew :kotlin:build
run: ./gradlew :kotlin:build --stacktrace
- name: Build Wear snippets
run: ./gradlew :wear:build
run: ./gradlew :wear:build --stacktrace
- name: Build misc snippets
run: ./gradlew :misc:build
run: ./gradlew :misc:build --stacktrace
- name: Build XR snippets
run: ./gradlew :xr:build
run: ./gradlew :xr:build --stacktrace
Comment on lines +41 to +51
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably remove this if the build is running again at the end

- name: Build Watch Face Push validation snippets
run: ./gradlew :watchfacepush:validator:run
run: ./gradlew :watchfacepush:validator:run --stacktrace
- name: Build All
run: ./gradlew build --stacktrace
5 changes: 2 additions & 3 deletions bluetoothle/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sample.android.bluetoothle">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
Expand All @@ -23,6 +22,6 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

</manifest>
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.sample.android.bluetoothle.java;

import androidx.appcompat.app.AppCompatActivity;

import android.Manifest;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.RequiresPermission;
import androidx.appcompat.app.AppCompatActivity;

import com.sample.android.bluetoothle.R;

public class MainActivity extends AppCompatActivity {
Expand All @@ -19,6 +21,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
}

@RequiresPermission(Manifest.permission.BLUETOOTH_CONNECT)
private void setUpBLE() {
// [START get_bluetooth_adapter]
// Initializes Bluetooth adapter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

package com.sample.android.bluetoothle.kotlin

import android.Manifest
import android.app.ListActivity
import android.bluetooth.BluetoothAdapter
import android.bluetooth.le.ScanCallback
import android.bluetooth.le.ScanResult
import android.os.Handler
import androidx.annotation.RequiresPermission
import com.sample.android.bluetoothle.java.LeDeviceListAdapter

/**
Expand All @@ -47,6 +49,7 @@ class DeviceScanActivity : ListActivity() {
// Stops scanning after 10 seconds.
private val SCAN_PERIOD: Long = 10000

@RequiresPermission(Manifest.permission.BLUETOOTH_SCAN)
private fun scanLeDevice() {
if (!mScanning) { // Stops scanning after a pre-defined scan period.
handler.postDelayed({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

package com.sample.android.bluetoothle.kotlin

import android.Manifest
import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothManager
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.annotation.RequiresPermission
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {
Expand All @@ -31,6 +33,7 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
}

@RequiresPermission(Manifest.permission.BLUETOOTH_CONNECT)
private fun setUpBLE() {
// [START get_bluetooth_adapter]
// Initializes Bluetooth adapter.
Expand Down
2 changes: 1 addition & 1 deletion identity/credentialmanager/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:enabled="true"
android:exported="true"
android:label="My Credential Provider"
android:icon="<any drawable icon>"
android:icon="@mipmap/ic_launcher"
android:permission="android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE"
tools:targetApi="upside_down_cake">
<intent-filter>
Expand Down
4 changes: 2 additions & 2 deletions xr/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
kotlin {
jvmToolchain(11)
}
buildFeatures {
compose = true
Expand Down