WIP - fixing corrupted frame due to gradle not copying resources

This commit is contained in:
Connor Tumbleson 2012-09-27 21:05:50 -05:00
parent 3562facfe2
commit 5ab853a249
3 changed files with 12 additions and 13 deletions

View File

@ -417,7 +417,8 @@ final public class AndrolibResources {
InputStream in = null; InputStream in = null;
OutputStream out = null; OutputStream out = null;
try { try {
in = AndrolibResources.class.getResourceAsStream("/brut/androlib/android-framework.jar"); in = AndrolibResources.class.getResourceAsStream(
"/brut/androlib/android-framework.jar");
out = new FileOutputStream(apk); out = new FileOutputStream(apk);
IOUtils.copy(in, out); IOUtils.copy(in, out);
return apk; return apk;
@ -579,4 +580,4 @@ final public class AndrolibResources {
private String mMaxSdkVersion = null; private String mMaxSdkVersion = null;
private String mTargetSdkVersion = null; private String mTargetSdkVersion = null;
} }

View File

@ -39,14 +39,6 @@ subprojects {
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'idea' apply plugin: 'idea'
gradle.taskGraph.whenReady {
ext.version = '1.5.1'
jar {
}
}
repositories { repositories {
mavenCentral() mavenCentral()
} }
@ -61,7 +53,7 @@ subprojects {
} }
project(':brut.j.util') { project(':brut.j.util') {
dependencies { dependencies {
compile project(':brut.j.common'), "commons-io:commons-io:1.4" compile project(':brut.j.common'), "commons-io:commons-io:2.4"
testCompile "junit:junit:3.8.1" testCompile "junit:junit:3.8.1"
} }
} }
@ -91,6 +83,13 @@ subprojects {
} }
} }
project(':brut.apktool:apktool-lib') { project(':brut.apktool:apktool-lib') {
gradle.taskGraph.whenReady {
task copy << {
from 'src/main/resources'
into 'build/resources/main'
include '**/*.jar'
}
}
processResources { processResources {
ext.fullrev = '' ext.fullrev = ''
ant.loadfile(srcFile: "../../.git/refs/heads/master", property: ext.fullrev) ant.loadfile(srcFile: "../../.git/refs/heads/master", property: ext.fullrev)
@ -110,7 +109,6 @@ subprojects {
version = apktoolversion version = apktoolversion
gradle.taskGraph.whenReady { gradle.taskGraph.whenReady {
// build a jar containing all dependencies
jar { jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
@ -123,4 +121,4 @@ subprojects {
dependencies { dependencies {
compile project(':brut.apktool:apktool-lib') compile project(':brut.apktool:apktool-lib')
} }
} }