I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit b8e005bd authored by str4d's avatar str4d
Browse files

Copy tasks can only have one destination directory

parent 6568489b
No related branches found
No related tags found
No related merge requests found
...@@ -70,58 +70,72 @@ if (propFile.canRead()) { ...@@ -70,58 +70,72 @@ if (propFile.canRead()) {
println 'local.properties not found' println 'local.properties not found'
} }
task copyDrawableResources(type: Copy) {
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
into 'src/main/res/drawable'
}
task certificatesZip(type: Zip) { task certificatesZip(type: Zip) {
archiveName = 'certificates_zip' archiveName = 'certificates_zip'
from files('' + i2pbase + '/installer/resources/certificates') from files('' + i2pbase + '/installer/resources/certificates')
} }
task copyI2PResources(type: Copy) { task copyRawResources(type:Copy) {
into 'src/main' from(i2pbase + '/installer/resources/blocklist.txt') { rename { 'blocklist_txt' } }
into('res/drawable') { from(i2pbase + '/installer/resources/hosts.txt') { rename { 'hosts_txt' } }
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png') from('../LICENSE.txt') { rename { 'license_app_txt' } }
} from('../licenses/LICENSE-Apache2.0.txt') { rename { 'license_apache20_txt' } }
into('res/raw') { from(i2pbase + '/licenses') {
from(i2pbase + '/installer/resources/blocklist.txt') { rename {'blocklist_txt' } } include { elem ->
from(i2pbase + '/installer/resources/hosts.txt') { rename {'hosts_txt' } } elem.name in [
from('../LICENSE.txt') { rename {'license_app_txt' } } 'LICENSE-ElGamalDSA.txt',
from('../licenses/LICENSE-Apache2.0.txt') { rename {'license_apache20_txt' } } 'LICENSE-SHA256.txt',
from(i2pbase + '/licenses') { 'LICENSE-BSD.txt',
include { elem -> 'LICENSE-SNTP.txt',
elem.name in [ 'LICENSE-LGPLv2.1.txt',
'LICENSE-ElGamalDSA.txt', 'LICENSE-InstallCert.txt',
'LICENSE-SHA256.txt', 'LICENSE-BlockFile.txt',
'LICENSE-BSD.txt', 'LICENSE-GPLv2.txt',
'LICENSE-SNTP.txt', 'LICENSE-GPLv3.txt',
'LICENSE-LGPLv2.1.txt', 'LICENSE-LGPLv3.txt',
'LICENSE-InstallCert.txt', 'LICENSE-FatCowIcons.txt',
'LICENSE-BlockFile.txt', 'LICENSE-Addressbook.txt',
'LICENSE-GPLv2.txt', ]
'LICENSE-GPLv3.txt', }
'LICENSE-LGPLv3.txt', rename { String name ->
'LICENSE-FatCowIcons.txt', String part = name.substring(8, name.lastIndexOf('.txt'))
'LICENSE-Addressbook.txt', String.format('license_%s_txt',
] part.toLowerCase(Locale.US).replace('.', '_'))
}
rename { String name ->
String part = name.substring(8, name.lastIndexOf('.txt'))
String.format('license_%s_txt',
part.toLowerCase(Locale.US).replace('.', '_'))
}
} }
from certificatesZip
}
// For peers WebView
into('assets/themes/console/images') {
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
from file(i2pbase + '/installer/resources/themes/console/images/inbound.png')
from file(i2pbase + '/installer/resources/themes/console/images/outbound.png')
}
into ('assets/themes/console/light') {
from file(i2pbase + '/installer/resources/themes/console/light/console.css')
}
into('assets/themes/console/light/images') {
from file(i2pbase + '/installer/resources/themes/console/light/images/header.png')
} }
from certificatesZip
into 'src/main/res/raw'
}
task copyI2PResources
copyI2PResources.dependsOn copyDrawableResources
copyI2PResources.dependsOn copyRawResources
// For peers WebView
task copyConsoleImagesAssets(type: Copy) {
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
from file(i2pbase + '/installer/resources/themes/console/images/inbound.png')
from file(i2pbase + '/installer/resources/themes/console/images/outbound.png')
into 'src/main/assets/themes/console/images'
} }
task copyConsoleLightAssets(type: Copy) {
from file(i2pbase + '/installer/resources/themes/console/light/console.css')
into 'src/main/assets/themes/console/light'
}
task copyConsoleLightImagesAssets(type: Copy) {
from file(i2pbase + '/installer/resources/themes/console/light/images/header.png')
into 'src/main/assets/themes/console/light/images'
}
task copyI2PAssets
copyI2PAssets.dependsOn copyConsoleImagesAssets
copyI2PAssets.dependsOn copyConsoleLightAssets
copyI2PAssets.dependsOn copyConsoleLightImagesAssets
preBuild.dependsOn copyI2PResources
preBuild.dependsOn copyI2PAssets
task cleanI2PResources(type: Delete) { task cleanI2PResources(type: Delete) {
delete file('src/main/res/drawable/i2plogo.png') delete file('src/main/res/drawable/i2plogo.png')
delete fileTree('src/main/res/raw') { delete fileTree('src/main/res/raw') {
...@@ -130,12 +144,15 @@ task cleanI2PResources(type: Delete) { ...@@ -130,12 +144,15 @@ task cleanI2PResources(type: Delete) {
include 'license_*' include 'license_*'
include 'certificates_zip' include 'certificates_zip'
} }
}
task cleanI2PAssets(type: Delete) {
delete fileTree('src/main/assets/themes/console/images') delete fileTree('src/main/assets/themes/console/images')
delete file('src/main/assets/themes/console/light/console.css') delete file('src/main/assets/themes/console/light/console.css')
delete file('src/main/assets/themes/console/light/images/header.png') delete file('src/main/assets/themes/console/light/images/header.png')
} }
preBuild.dependsOn copyI2PResources
clean.dependsOn cleanI2PResources clean.dependsOn cleanI2PResources
clean.dependsOn cleanI2PAssets
props = new Properties() props = new Properties()
propFile = new File(project.rootDir, 'signing.properties') propFile = new File(project.rootDir, 'signing.properties')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment