mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
build: Use download task output for dependency instead of hardcoding path
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
ce3ff3f1a4
commit
ff32ab1172
@ -167,6 +167,10 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def webRtcVersion = "96.4664.0"
|
def webRtcVersion = "96.4664.0"
|
||||||
|
tasks.register('downloadWebRtc', DownloadWebRtcTask){
|
||||||
|
version = webRtcVersion
|
||||||
|
}
|
||||||
|
preBuild.dependsOn('downloadWebRtc')
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
exclude group: 'com.google.firebase', module: 'firebase-core'
|
exclude group: 'com.google.firebase', module: 'firebase-core'
|
||||||
@ -241,7 +245,7 @@ dependencies {
|
|||||||
kapt "com.jakewharton:butterknife-compiler:${butterknifeVersion}"
|
kapt "com.jakewharton:butterknife-compiler:${butterknifeVersion}"
|
||||||
implementation 'eu.davidea:flexible-adapter:5.1.0'
|
implementation 'eu.davidea:flexible-adapter:5.1.0'
|
||||||
implementation 'eu.davidea:flexible-adapter-ui:1.0.0'
|
implementation 'eu.davidea:flexible-adapter-ui:1.0.0'
|
||||||
implementation files("${project.buildDir}/download/libwebrtc-${webRtcVersion}.aar")
|
implementation fileTree(downloadWebRtc.getOutputPath())
|
||||||
implementation 'com.yarolegovich:lovely-dialog:1.1.1'
|
implementation 'com.yarolegovich:lovely-dialog:1.1.1'
|
||||||
implementation 'com.yarolegovich:mp:1.1.6'
|
implementation 'com.yarolegovich:mp:1.1.6'
|
||||||
implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0'
|
implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0'
|
||||||
@ -348,8 +352,3 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|||||||
jvmTarget = "1.8"
|
jvmTarget = "1.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('downloadWebRtc', DownloadWebRtcTask){
|
|
||||||
version = webRtcVersion
|
|
||||||
}
|
|
||||||
preBuild.dependsOn('downloadWebRtc')
|
|
@ -35,7 +35,7 @@ abstract class DownloadWebRtcTask extends DefaultTask {
|
|||||||
|
|
||||||
@OutputFile
|
@OutputFile
|
||||||
File getLibFile() {
|
File getLibFile() {
|
||||||
return new File("${project.buildDir}/download/${getFileName()}")
|
return new File(getOutputPath())
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getFileName() {
|
private String getFileName() {
|
||||||
@ -48,6 +48,10 @@ abstract class DownloadWebRtcTask extends DefaultTask {
|
|||||||
return "https://github.com/nextcloud-releases/talk-clients-webrtc/releases/download/${webRtcVersion}-RC1/${getFileName()}"
|
return "https://github.com/nextcloud-releases/talk-clients-webrtc/releases/download/${webRtcVersion}-RC1/${getFileName()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOutputPath() {
|
||||||
|
return "${project.buildDir}/download/${getFileName()}"
|
||||||
|
}
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
def run() {
|
def run() {
|
||||||
libFile.parentFile.mkdirs()
|
libFile.parentFile.mkdirs()
|
||||||
|
Loading…
Reference in New Issue
Block a user