mill icon indicating copy to clipboard operation
mill copied to clipboard

Importing `jadx` gradle project fails

Open lihaoyi opened this issue 1 month ago • 1 comments

https://github.com/skylot/jadx

lihaoyi Github$ git clone --depth=1 https://github.com/skylot/jadx
Cloning into 'jadx'...
cd remote: Enumerating objects: 2962, done.
remote: Counting objects: 100% (2962/2962), done.
remote: Compressing objects: 100% (2417/2417), done.
remote: Total 2962 (delta 417), reused 1892 (delta 312), pack-reused 0 (from 0)
Receiving objects: 100% (2962/2962), 2.66 MiB | 8.00 MiB/s, done.
Resolving deltas: 100% (417/417), done.
lihaoyi Github$ cd jadx
lihaoyi jadx$ cp ../ghidra/.mill-version .
lihaoyi jadx$ cp ~/Github/mill/mill .     
lihaoyi jadx$ ./mill init
[build.mill-59/64] compile
[build.mill-59] [info] compiling 3 Scala sources to /Users/lihaoyi/Github/jadx/out/mill-build/compile.dest/classes ...
[build.mill-59] [info] done compiling
[1/1] init
[14/14] mill.init.InitGradleModule.init
converting Gradle build
connecting to Gradle daemon
Downloading https://services.gradle.org/distributions/gradle-9.1.0-bin.zip
................................................................................................................................
writing Mill build file to build.mill
writing Mill build file to jadx-plugins/package.mill
writing Mill build file to jadx-plugins/jadx-rename-mappings/package.mill
writing Mill build file to jadx-plugins/jadx-script/package.mill
writing Mill build file to jadx-plugins/jadx-script/jadx-script-plugin/package.mill
writing Mill build file to jadx-plugins/jadx-script/examples/package.mill
writing Mill build file to jadx-plugins/jadx-script/jadx-script-ide/package.mill
writing Mill build file to jadx-plugins/jadx-script/jadx-script-runtime/package.mill
writing Mill build file to jadx-plugins/jadx-dex-input/package.mill
writing Mill build file to jadx-plugins/jadx-input-api/package.mill
writing Mill build file to jadx-plugins/jadx-kotlin-metadata/package.mill
writing Mill build file to jadx-plugins/jadx-raung-input/package.mill
writing Mill build file to jadx-plugins/jadx-xapk-input/package.mill
writing Mill build file to jadx-plugins/jadx-apkm-input/package.mill
writing Mill build file to jadx-plugins/jadx-java-input/package.mill
writing Mill build file to jadx-plugins/jadx-kotlin-source-debug-extension/package.mill
writing Mill build file to jadx-plugins/jadx-smali-input/package.mill
writing Mill build file to jadx-plugins/jadx-apks-input/package.mill
writing Mill build file to jadx-plugins/jadx-aab-input/package.mill
writing Mill build file to jadx-plugins/jadx-java-convert/package.mill
writing Mill build file to jadx-commons/package.mill
writing Mill build file to jadx-commons/jadx-app-commons/package.mill
writing Mill build file to jadx-commons/jadx-zip/package.mill
writing Mill build file to jadx-core/package.mill
writing Mill build file to jadx-plugins-tools/package.mill
writing Mill build file to jadx-gui/package.mill
writing Mill build file to jadx-cli/package.mill
writing Mill meta-build file to mill-build/src/JadxBaseModule.scala
writing Mill meta-build file to mill-build/src/JadxPublishModule.scala
writing Mill meta-build file to mill-build/src/Deps.scala
NOTE: It is recommended to set `mill-jvm-version` in the header section of the root build.mill file.
formatting Mill build files
Formatting 30 Scala sources
parsed config (v3.8.5): /Users/lihaoyi/Github/jadx/out/mill/init/InitGradleModule/buildGenScalafmtConfig.dest/.scalafmt.conf
init completed, run "mill resolve _" to list available tasks
[1/1] ============================== init ============================== 137s
lihaoyi jadx$ ./mill __.compile
[build.mill-59/64] compile
[build.mill-59] [info] compiling 58 Scala sources to /Users/lihaoyi/Github/jadx/out/mill-build/compile.dest/classes ...
[build.mill-59] [info] done compiling
[1117/1233] jadx-commons.jadx-app-commons.compile
[1114/1233] jadx-commons.jadx-zip.compile
[1117] [info] compiling 4 Java sources to /Users/lihaoyi/Github/jadx/out/jadx-commons/jadx-app-commons/compile.dest/classes ...
[1114] [info] compiling 16 Java sources to /Users/lihaoyi/Github/jadx/out/jadx-commons/jadx-zip/compile.dest/classes ...
[1117] [info] done compiling
[1114] [info] done compiling
[1118/1233] jadx-plugins.jadx-input-api.compile
[1118] [info] compiling 57 Java sources to /Users/lihaoyi/Github/jadx/out/jadx-plugins/jadx-input-api/compile.dest/classes ...
[1118] [info] done compiling
[1131/1233] jadx-core.compile
[1131] [info] compiling 516 Java sources to /Users/lihaoyi/Github/jadx/out/jadx-core/compile.dest/classes ...
[1131] [info] /Users/lihaoyi/Github/jadx/jadx-core/src/main/java/jadx/api/JavaClass.java: Some input files use or override a deprecated API.
[1131] [info] /Users/lihaoyi/Github/jadx/jadx-core/src/main/java/jadx/api/JavaClass.java: Recompile with -Xlint:deprecation for details.
[1131] [info] done compiling
[1148/1233] jadx-plugins.jadx-dex-input.compile
[1148] [info] compiling 40 Java sources to /Users/lihaoyi/Github/jadx/out/jadx-plugins/jadx-dex-input/compile.dest/classes ...
[1148] [info] done compiling
[1157/1233] jadx-plugins.jadx-rename-mappings.compile
[1157] [info] compiling 9 Java sources to /Users/lihaoyi/Github/jadx/out/jadx-plugins/jadx-rename-mappings/compile.dest/classes ...
[1157] [info] done compiling
[1233/1233, 4 failed] ============================== __.compile ============================== 36s
4 tasks failed
[1129] jadx-plugins.jadx-script.examples.resolvedMvnDeps java.lang.RuntimeException: Cannot find org.jetbrains.kotlin:kotlin-scripting-dependencies-maven: in projectCache
[1124] jadx-plugins.jadx-script.jadx-script-runtime.resolvedMvnDeps java.lang.RuntimeException: Cannot find org.jetbrains.kotlin:kotlin-scripting-common: in projectCache
[1128] jadx-core.test.resolvedMvnDeps java.lang.RuntimeException: 
Resolution failed for 1 modules:
--------------------------------------------
  org.eclipse.jdt:ecj:[3.33, 3.34[ 
	Not an internal Mill module: org.eclipse.jdt:ecj:[3.33, 3.34[
	download error: Caught java.io.IOException (Server returned HTTP response code: 400 for URL: https://dl.google.com/dl/android/maven2/org/eclipse/jdt/ecj/[3.33, 3.34[/ecj-[3.33, 3.34[.pom) while downloading https://dl.google.com/dl/android/maven2/org/eclipse/jdt/ecj/[3.33, 3.34[/ecj-[3.33, 3.34[.pom
	not found: /Users/lihaoyi/.ivy2/local/org.eclipse.jdt/ecj/[3.33, 3.34[/ivys/ivy.xml
	not found: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/[3.33, 3.34[/ecj-[3.33, 3.34[.pom

--------------------------------------------

For additional information on library dependencies, see the docs at
https://mill-build.org/mill/Library_Dependencies.html

    scala.sys.package$.error(package.scala:27)
    mill.api.daemon.Result$Failure.get(Result.scala:40)
    mill.api.daemon.Result$Failure.get(Result.scala:40)
    mill.javalib.CoursierModule$Resolver.classpath(CoursierModule.scala:266)
    mill.javalib.JavaModule.resolvedMvnDeps$$anonfun$1$$anonfun$1(JavaModule.scala:1017)
    mill.api.Task$Named.evaluate(Task.scala:389)
    mill.api.Task$Named.evaluate$(Task.scala:374)
    mill.api.Task$Computed.evaluate(Task.scala:400)
[1158] jadx-plugins.jadx-script.jadx-script-plugin.resolvedMvnDeps java.lang.RuntimeException: Cannot find org.jetbrains.kotlin:kotlin-scripting-jvm: in projectCache

CC @ajaychandran

lihaoyi avatar Nov 01 '25 07:11 lihaoyi

Looks like coursier does not understand the right open interval notation used in the version of ecj: [3.33, 3.34[.

Edit:

Might be not (any more) an standard, according to https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification, right-open intervals use a ) as marker. Maybe, Gradle accepts it? We could also try to textually replace the [ by a ) at the end of a version, as a workaround. Same for ] -> ( at the start of a version.

Edit 2: Yeah. According to Gradle docs https://docs.gradle.org/current/userguide/dependency_versions.html#sec:maven-style-range , those interval notations are a compat shim for Maven. So they probably removed that at some point in time?

lefou avatar Nov 01 '25 09:11 lefou