Skip to content

Commit

Permalink
Gradle: Don't resolve classpath during configuration phase
Browse files Browse the repository at this point in the history
  • Loading branch information
elizarov committed Nov 20, 2019
1 parent 1da7311 commit 729dc5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gradle/dokka.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ dokka {
if (project.name != "kotlinx-coroutines-core") {
dependsOn(project.configurations.compileClasspath)
dependsOn(project.sourceSets.main.output)
afterEvaluate {
doFirst {
// resolve classpath only during execution
classpath = project.configurations.dokkaStubs.files + project.configurations.compileClasspath.files + project.sourceSets.main.output.files
}
}
Expand Down
9 changes: 5 additions & 4 deletions ui/kotlinx-coroutines-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ class RunR8Task extends JavaExec {
super.configure(closure)
classpath = project.configurations.r8
main = 'com.android.tools.r8.R8'
return this
}

@Override
void exec() {
// Resolve classpath only during execution
def arguments = [
'--release',
'--no-desugaring',
Expand All @@ -59,11 +64,7 @@ class RunR8Task extends JavaExec {
arguments.addAll(jarFile.absolutePath)

args = arguments
return this
}

@Override
void exec() {
if (outputDex.exists()) {
outputDex.deleteDir()
}
Expand Down

0 comments on commit 729dc5d

Please sign in to comment.