Skip to content

Commit

Permalink
Fix issues with #871 when using Android Gradle Plugin 3.1 (#923)
Browse files Browse the repository at this point in the history
* Fix issues with #871 when using Android Gradle Plugin 3.1

* Use single task to copy to both locations

* Correct spelling typo
  • Loading branch information
chrisbianca authored and hampustagerud committed Jan 17, 2019
1 parent 5dbd964 commit e218fec
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions fonts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,23 @@ gradle.projectsEvaluated {

// Create task for copying fonts
def currentFontTask = tasks.create(
name: "copy${targetName}IconFonts",
type: Copy) {
iconFontNames.each { name ->
from(iconFontsDir)
include(name)
into("${buildDir}/intermediates/assets/${targetPath}/fonts/")

// compatible with Android Gradle Plugin 3.2+ new asset directory
into("${buildDir}/intermediates/merged_assets/${targetPath}/merge${targetName}Assets/out/fonts/")
name: "copy${targetName}IconFonts",
type: Copy) {

into("${buildDir}/intermediates")

iconFontNames.each { fontName ->

from(iconFontsDir) {
include(fontName)
into("assets/${targetPath}/fonts/")
}

from(iconFontsDir) {
include(fontName)
into("merged_assets/${targetPath}/merge${targetName}Assets/out/fonts/")
}
}
}

currentFontTask.dependsOn("merge${targetName}Resources")
Expand Down

0 comments on commit e218fec

Please sign in to comment.