2024-07-19 11:25:28 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
|
|
|
group = 'dev.maelstrom'
|
2024-07-19 12:46:18 +00:00
|
|
|
version = '0.3-SNAPSHOT'
|
2024-07-19 11:25:28 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
2024-07-19 12:46:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register('extractApk', JavaExec) {
|
|
|
|
onlyIf {
|
|
|
|
!file('build/extracted').exists()
|
|
|
|
}
|
|
|
|
|
|
|
|
classpath = files('tools/apktool_2.9.3.jar')
|
|
|
|
|
|
|
|
args = ['d', 'source-apk/tumblr.apk', '-o', 'build/extracted']
|
|
|
|
}
|
|
|
|
|
|
|
|
// NOTE: Maybe broken if gradle thinks the extracted files are newer?
|
|
|
|
tasks.register('mergeResources') {
|
|
|
|
dependsOn tasks.extractApk
|
|
|
|
doLast {
|
2024-07-19 13:10:42 +00:00
|
|
|
copy { // Copy from extracted
|
2024-07-19 12:46:18 +00:00
|
|
|
from 'build/extracted'
|
|
|
|
into 'build/merged'
|
2024-07-19 13:10:42 +00:00
|
|
|
//exclude 'smali_classes*', 'smali'
|
2024-07-19 12:46:18 +00:00
|
|
|
}
|
2024-07-19 13:10:42 +00:00
|
|
|
copy { // Copy resources from src
|
2024-07-19 12:46:18 +00:00
|
|
|
from 'src/main/resources'
|
|
|
|
into 'build/merged'
|
|
|
|
}
|
2024-07-19 13:10:42 +00:00
|
|
|
copy { // Copy smali from src
|
|
|
|
from 'src/main/smali'
|
|
|
|
into 'build/merged'
|
|
|
|
}
|
2024-07-19 12:46:18 +00:00
|
|
|
}
|
2024-07-19 11:25:28 +00:00
|
|
|
}
|