mirror of
https://github.com/revanced/Apktool.git
synced 2025-02-11 03:16:47 +01:00
unify smali/baksmali/apktool properties into one folder
This commit is contained in:
parent
7e6ad41830
commit
dd881e21d1
10
.gitignore
vendored
10
.gitignore
vendored
@ -9,3 +9,13 @@ brut.apktool/apktool-lib/build*
|
|||||||
brut.apktool/build*
|
brut.apktool/build*
|
||||||
build*
|
build*
|
||||||
*~
|
*~
|
||||||
|
/brut.apktool/nbproject/private/
|
||||||
|
/brut.apktool.smali/baksmali/nbproject/private/
|
||||||
|
/brut.apktool.smali/dexlib/nbproject/private/
|
||||||
|
/brut.apktool.smali/nbproject/private/
|
||||||
|
/nbproject/private/
|
||||||
|
/brut.apktool.smali/smali/nbproject/private/
|
||||||
|
/brut.apktool.smali/util/nbproject/private/
|
||||||
|
/brut.apktool/apktool-lib/nbproject/private/
|
||||||
|
/brut.apktool/apktool-cli/nbproject/private/
|
||||||
|
*.kate-swp
|
||||||
|
@ -39,8 +39,7 @@ public class ApktoolProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void loadProps() {
|
private static void loadProps() {
|
||||||
InputStream in = ApktoolProperties.class
|
InputStream in = main.class.getResourceAsStream("/properties/apktool.properties");
|
||||||
.getResourceAsStream("apktool.properties");
|
|
||||||
sProps = new Properties();
|
sProps = new Properties();
|
||||||
try {
|
try {
|
||||||
sProps.load(in);
|
sProps.load(in);
|
||||||
@ -49,7 +48,7 @@ public class ApktoolProperties {
|
|||||||
LOGGER.warning("Can't load properties.");
|
LOGGER.warning("Can't load properties.");
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream templateStream = baksmali.class.getClassLoader().getResourceAsStream("properties/baksmali.properties");
|
InputStream templateStream = main.class.getClassLoader().getResourceAsStream("/properties/baksmali.properties");
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
String version = "(unknown)";
|
String version = "(unknown)";
|
||||||
try {
|
try {
|
||||||
@ -58,7 +57,7 @@ public class ApktoolProperties {
|
|||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
}
|
}
|
||||||
sProps.put("baksmaliVersion", version);
|
sProps.put("baksmaliVersion", version);
|
||||||
templateStream = main.class.getClassLoader().getResourceAsStream("smali.properties");
|
templateStream = main.class.getClassLoader().getResourceAsStream("/properties/smali.properties");
|
||||||
properties = new Properties();
|
properties = new Properties();
|
||||||
version = "(unknown)";
|
version = "(unknown)";
|
||||||
try {
|
try {
|
||||||
|
@ -417,8 +417,7 @@ final public class AndrolibResources {
|
|||||||
InputStream in = null;
|
InputStream in = null;
|
||||||
OutputStream out = null;
|
OutputStream out = null;
|
||||||
try {
|
try {
|
||||||
in = AndrolibResources.class.getResourceAsStream(
|
in = AndrolibResources.class.getResourceAsStream("brut/androlib/android-framework.jar");
|
||||||
"/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;
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package brut.androlib;
|
package brut.androlib;
|
||||||
|
|
||||||
import brut.androlib.res.util.ExtFile;
|
import brut.androlib.res.util.ExtFile;
|
||||||
|
45
build.gradle
45
build.gradle
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
apply plugin: 'license'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -12,11 +13,28 @@ task wrapper(type: Wrapper) {
|
|||||||
gradleVersion = '1.2'
|
gradleVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
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,33 +79,6 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
project(':brut.apktool:apktool-lib') {
|
project(':brut.apktool:apktool-lib') {
|
||||||
ext.baseVersion = '1.5.1'
|
|
||||||
ext.jarVersion = baseVersion
|
|
||||||
|
|
||||||
def versionSuffix
|
|
||||||
try {
|
|
||||||
def git = org.eclipse.jgit.api.Git.open(file('.'))
|
|
||||||
def head = git.getRepository().getRef("HEAD")
|
|
||||||
versionSuffix = head.getObjectId().abbreviate(8).name()
|
|
||||||
|
|
||||||
if (!git.status().call().clean) {
|
|
||||||
versionSuffix += '-dirty'
|
|
||||||
}
|
|
||||||
} catch (Exception) {
|
|
||||||
// In case we can't get the commit for some reason,
|
|
||||||
// just use -dev
|
|
||||||
versionSuffix = 'SNAPSHOT'
|
|
||||||
}
|
|
||||||
|
|
||||||
version = baseVersion + '-' + versionSuffix
|
|
||||||
|
|
||||||
// use <version>-dev for the jar name, rather than the
|
|
||||||
// full commit+dirty string
|
|
||||||
jarVersion = baseVersion + '-dev'
|
|
||||||
|
|
||||||
jar {
|
|
||||||
version = jarVersion
|
|
||||||
}
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile ("junit:junit:4.10") {
|
compile ("junit:junit:4.10") {
|
||||||
exclude(module: 'hamcrest-core')
|
exclude(module: 'hamcrest-core')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user