android: use tasks.register in build.gradle
Signed-off-by: Rash419 <rashesh.padia@collabora.com> Change-Id: I1ab6908f333115247018a53f6e954751bb13fc8cpull/7195/head
parent
2e29d67888
commit
c0273e8574
|
@ -82,9 +82,9 @@ dependencies {
|
|||
}
|
||||
}
|
||||
|
||||
task copyBrandFiles(type: Copy) {
|
||||
from "${liboBrandingDir}/android"
|
||||
into "src/main/res"
|
||||
tasks.register('copyBrandFiles', Copy) {
|
||||
from "${liboBrandingDir}/android"
|
||||
into "src/main/res"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
|
|
|
@ -22,7 +22,7 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ dependencies {
|
|||
}
|
||||
}
|
||||
|
||||
task copyUnpackAssets(type: Copy) {
|
||||
tasks.register('copyUnpackAssets', Copy) {
|
||||
description "copies assets that need to be extracted on the device"
|
||||
into 'src/main/assets/unpack'
|
||||
into('program') {
|
||||
|
@ -104,7 +104,7 @@ task copyUnpackAssets(type: Copy) {
|
|||
}
|
||||
into('etc/coolwsd') {
|
||||
from('/android/coolkitconfig.xcu')
|
||||
includes = [ 'coolkitconfig.xcu' ]
|
||||
includes = ['coolkitconfig.xcu']
|
||||
}
|
||||
into('user/fonts') {
|
||||
from "${liboInstdir}/share/fonts/truetype"
|
||||
|
@ -131,7 +131,7 @@ task copyUnpackAssets(type: Copy) {
|
|||
filter {
|
||||
String line ->
|
||||
line.replaceAll(
|
||||
'@@APPLICATION_ID@@', new String("${liboApplicationId}")
|
||||
'@@APPLICATION_ID@@', new String("${liboApplicationId}")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -147,15 +147,15 @@ task copyUnpackAssets(type: Copy) {
|
|||
includes = ['extensions/dict-de/**', 'extensions/dict-en/**', 'extensions/dict-es/**', 'extensions/dict-fr/**', 'extensions/dict-pt-BR/**']
|
||||
exclude { FileTreeElement details ->
|
||||
!(details.file.isDirectory() ||
|
||||
details.file.name.endsWith('.xcu') ||
|
||||
details.file.name.endsWith('.dic') ||
|
||||
details.file.name.endsWith('.aff') ||
|
||||
details.file.name.endsWith('.xml'))
|
||||
details.file.name.endsWith('.xcu') ||
|
||||
details.file.name.endsWith('.dic') ||
|
||||
details.file.name.endsWith('.aff') ||
|
||||
details.file.name.endsWith('.xml'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task copyAssets(type: Copy) {
|
||||
tasks.register('copyAssets', Copy) {
|
||||
description "copies assets that can be accessed within the installed apk"
|
||||
into 'src/main/assets'
|
||||
from("${liboSrcRoot}/instdir/") {
|
||||
|
@ -177,7 +177,7 @@ task copyAssets(type: Copy) {
|
|||
}
|
||||
}
|
||||
|
||||
task createFullConfig(type: Copy) {
|
||||
tasks.register('createFullConfig', Copy) {
|
||||
description "copies various configuration bits into the apk"
|
||||
into('src/main/assets/share/config')
|
||||
from("${liboInstdir}/share/config") {
|
||||
|
@ -185,25 +185,25 @@ task createFullConfig(type: Copy) {
|
|||
}
|
||||
}
|
||||
|
||||
task copyBrandTheme(type: Copy) {
|
||||
from "${liboBrandingDir}/online-theme"
|
||||
into "src/main/assets/share/theme_definitions/online"
|
||||
tasks.register('copyBrandTheme', Copy) {
|
||||
from "${liboBrandingDir}/online-theme"
|
||||
into "src/main/assets/share/theme_definitions/online"
|
||||
}
|
||||
|
||||
task copyDocTemplates(type: Copy) {
|
||||
from "${rootProject.getRootDir()}/templates/untitled.odp",
|
||||
"${rootProject.getRootDir()}/templates/untitled.ods",
|
||||
"${rootProject.getRootDir()}/templates/untitled.odt"
|
||||
into "src/main/assets/templates"
|
||||
tasks.register('copyDocTemplates', Copy) {
|
||||
from "${rootProject.getRootDir()}/templates/untitled.odp",
|
||||
"${rootProject.getRootDir()}/templates/untitled.ods",
|
||||
"${rootProject.getRootDir()}/templates/untitled.odt"
|
||||
into "src/main/assets/templates"
|
||||
}
|
||||
|
||||
task copyKitConfig(type: Copy) {
|
||||
from "${file(rootProject.getRootDir()).getParent()}/coolkitconfig-mobile.xcu"
|
||||
into "src/main/assets/etc/coolwsd"
|
||||
rename { "coolkitconfig.xcu" }
|
||||
tasks.register('copyKitConfig', Copy) {
|
||||
from "${file(rootProject.getRootDir()).getParent()}/coolkitconfig-mobile.xcu"
|
||||
into "src/main/assets/etc/coolwsd"
|
||||
rename { "coolkitconfig.xcu" }
|
||||
}
|
||||
|
||||
task createStrippedConfig {
|
||||
tasks.register('createStrippedConfig') {
|
||||
def preserveDir = file("src/main/assets/share/config/soffice.cfg/empty")
|
||||
outputs.dir "src/main/assets/share/registry/res"
|
||||
outputs.file preserveDir
|
||||
|
@ -216,7 +216,7 @@ task createStrippedConfig {
|
|||
}
|
||||
}
|
||||
|
||||
task createRCfiles {
|
||||
tasks.register('createRCfiles') {
|
||||
inputs.file "libSettings.gradle"
|
||||
dependsOn copyUnpackAssets, copyAssets
|
||||
def sofficerc = file('src/main/assets/unpack/program/sofficerc')
|
||||
|
@ -304,7 +304,7 @@ preBuild.dependsOn 'createRCfiles',
|
|||
'createFullConfig',
|
||||
'copyBrandTheme'
|
||||
|
||||
task generateCoolDebugAssets {
|
||||
tasks.register('generateCoolDebugAssets') {
|
||||
doLast {
|
||||
exec {
|
||||
commandLine 'make', '-C', "${rootProject.getBuildDir()}/../../browser", 'clean'
|
||||
|
@ -315,7 +315,7 @@ task generateCoolDebugAssets {
|
|||
}
|
||||
}
|
||||
|
||||
task generateCoolReleaseAssets {
|
||||
tasks.register('generateCoolReleaseAssets') {
|
||||
doLast {
|
||||
exec {
|
||||
commandLine 'make', '-C', "${rootProject.getBuildDir()}/../../browser", 'clean'
|
||||
|
|
Loading…
Reference in New Issue