fschrofner/jadx-jitpack


fork of jadx. slight modifications were made to allow jitpack builds https://jitpack.io/#fschrofner/jadx-jitpack

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.fschrofner:jadx-jitpack:v0.6.1-dev2'
	}
	dependencies {
		implementation("com.github.fschrofner:jadx-jitpack:v0.6.1-dev2")
	}
	<dependency>
	    <groupId>com.github.fschrofner</groupId>
	    <artifactId>jadx-jitpack</artifactId>
	    <version>v0.6.1-dev2</version>
	</dependency>

                            
    libraryDependencies += "com.github.fschrofner" % "jadx-jitpack" % "v0.6.1-dev2"
        
        

                            
    :dependencies [[com.github.fschrofner/jadx-jitpack "v0.6.1-dev2"]]
        
        

Readme


jadx-jitpack

This is a fork of jadx, which has received some slight modifications (removing unnecessary files, editing build.gradle, adding gradle wrapper) in order to be built with jitpack's build system.

This has been done, since jadx does not provide a package on maven central. To use the jadx core library in your gradle project, simply add the jitpack repo:

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Then add this repository as dependency:

dependencies {
    compile 'com.github.fschrofner:jadx-jitpack:0.6.1'
}

Please note, that there might be a newer tag. Just check the newest available tag here (also shown next to the headline) and replace 0.6.1 by the newest tag name.
If you'd like to use another build system, just check the link above as well.

Logback

Jadx uses (and requires) logback to run, so you need to include that in your project. I decided to strip the dependency from the lib itself, as it would make it hard to do any logging in your project as both logging libraries interfere.

So if you stumble upon an error that has anything to do with logging, make sure that you included the following (or another logback version) in your build.gradle.

dependencies {
    compile 'ch.qos.logback:logback-classic:1.1.7'
}

If you then want to prevent jadx from logging anything, create a file at src/main/resources/logback.groovy with the following contents.

root(OFF, [])

After that you should be good to go.

Using jadx without jitpack

If you want to use jadx without using the convenient method above, you can always just execute ./gradlew jar in the jadx-core directory to get a usable jar in the build/libs directory.

To use this jar in your gradle project you'd need to copy it to your libs folder and then add the following:

allprojects {
  repositories {
    flatDir {
      dirs 'libs'
    }
  }
}

dependencies {
    compile name: 'jadx-core-0.6.1'
}

Of course the name needs to be changed to reflect the name of your .jar file.