Skip to content

Commit 673aa0a

Browse files
authored
Merge pull request #10428 from Isira-Seneviratne/AGP_8.1
Bump AGP to 8.1.1
2 parents 50fb48f + 779ea19 commit 673aa0a

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

app/src/main/java/org/schabi/newpipe/streams/io/StoredDirectoryHelper.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public boolean isDirect() {
170170

171171
/**
172172
* Only using Java I/O. Creates the directory named by this abstract pathname, including any
173-
* necessary but nonexistent parent directories. Note that if this
174-
* operation fails it may have succeeded in creating some of the necessary
173+
* necessary but nonexistent parent directories.
174+
* Note that if this operation fails it may have succeeded in creating some of the necessary
175175
* parent directories.
176176
*
177177
* @return <code>true</code> if and only if the directory was created,
@@ -180,9 +180,12 @@ public boolean isDirect() {
180180
*/
181181
public boolean mkdirs() {
182182
if (docTree == null) {
183-
// TODO: Use Files.createDirectories() when AGP 8.1 is available:
184-
// https://issuetracker.google.com/issues/282544786
185-
return Files.exists(ioTree) || ioTree.toFile().mkdirs();
183+
try {
184+
Files.createDirectories(ioTree);
185+
} catch (final IOException e) {
186+
Log.e(TAG, "Error while creating directories at " + ioTree, e);
187+
}
188+
return Files.exists(ioTree);
186189
}
187190

188191
if (docTree.exists()) {

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.0.2'
10+
classpath 'com.android.tools.build:gradle:8.1.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212

1313
// NOTE: Do not place your application dependencies here; they belong

0 commit comments

Comments
 (0)