luoyesiqiu / dpt-shell

An android Dex protects shell implementation
MIT License
519 stars 190 forks source link

Can't compile #37

Closed VanHoevenTR closed 2 months ago

VanHoevenTR commented 2 months ago

I always get this error when trying to compile. Maybe because I'm using Gradle 8.4 instead 7.5. I can't use 7.5 because I use JDK 21.0.2. Do you know how to fix this?

PS F:\project\Java\DexEnc-dpt-shell> ./gradlew dpt:assemble --info
Initialized native services in: C:\Users\AAA\.gradle\native
Initialized jansi services in: C:\Users\AAA\.gradle\native
Received JVM installation metadata from 'C:\Program Files\Java\jdk-21': {JAVA_HOME=C:\Program Files\Java\jdk-21, JAVA_VERSION=21.0.2, JAVA_VENDOR=Oracle Corporation, RUNTIME_NAME=Java(TM) SE Runtime Environment, RUNTIME_VERSION=21.0.2+13-LTS-58, VM_NAME=Java HotSpot(TM) 64-Bit Server VM, VM_VERSION=21.0.2+13-LTS-58, VM_VENDOR=Oracle Corporation, OS_ARCH=amd64}
The client will now receive all logging from the daemon (pid: 41968). The daemon log file: C:\Users\AAA\.gradle\daemon\8.4\daemon-41968.out.log
Starting 7th build in daemon [uptime: 8 mins 21.508 secs, performance: 98%, GC rate: 0.00/s, heap usage: 0% of 2 GiB]
Using 8 worker leases.
Now considering [F:\project\Java\DexEnc-dpt-shell, F:\project\Java\DexEnc-dpt-shell\buildSrc] as hierarchies to watch
Now considering [F:\project\Java\DexEnc-dpt-shell\buildSrc, F:\project\Java\DexEnc-dpt-shell] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file 'F:\project\Java\DexEnc-dpt-shell\settings.gradle'.
Projects loaded. Root project using build file 'F:\project\Java\DexEnc-dpt-shell\build.gradle'.
Included projects: [root project 'dpt', project ':dpt', project ':shell']

> Configure project :buildSrc
Evaluating project ':buildSrc' using build file 'F:\project\Java\DexEnc-dpt-shell\buildSrc\build.gradle'.
Resolve mutations for :buildSrc:compileJava (Thread[#343,Execution worker,5,main]) started.
:buildSrc:compileJava (Thread[#343,Execution worker,5,main]) started.

> Task :buildSrc:compileJava UP-TO-DATE
Caching disabled for task ':buildSrc:compileJava' because:
  Build cache is disabled
Skipping task ':buildSrc:compileJava' as it is up-to-date.
Resolve mutations for :buildSrc:compileGroovy (Thread[#343,Execution worker,5,main]) started.
:buildSrc:compileGroovy (Thread[#343,Execution worker,5,main]) started.

> Task :buildSrc:compileGroovy NO-SOURCE
Skipping task ':buildSrc:compileGroovy' as it has no source files and no previous output files.
Resolve mutations for :buildSrc:processResources (Thread[#343,Execution worker,5,main]) started.
:buildSrc:processResources (Thread[#343,Execution worker,5,main]) started.

> Task :buildSrc:processResources UP-TO-DATE
Caching disabled for task ':buildSrc:processResources' because:
  Build cache is disabled
Skipping task ':buildSrc:processResources' as it is up-to-date.
Resolve mutations for :buildSrc:classes (Thread[#343,Execution worker,5,main]) started.
:buildSrc:classes (Thread[#347,Execution worker Thread 5,5,main]) started.

> Task :buildSrc:classes UP-TO-DATE
Skipping task ':buildSrc:classes' as it has no actions.
Resolve mutations for :buildSrc:jar (Thread[#347,Execution worker Thread 5,5,main]) started.
:buildSrc:jar (Thread[#347,Execution worker Thread 5,5,main]) started.

> Task :buildSrc:jar UP-TO-DATE
Caching disabled for task ':buildSrc:jar' because:
  Build cache is disabled
Skipping task ':buildSrc:jar' as it is up-to-date.

> Configure project :
Evaluating root project 'dpt' using build file 'F:\project\Java\DexEnc-dpt-shell\build.gradle'.

> Configure project :dpt
Evaluating project ':dpt' using build file 'F:\project\Java\DexEnc-dpt-shell\dpt\build.gradle'.

> Configure project :shell
Evaluating project ':shell' using build file 'F:\project\Java\DexEnc-dpt-shell\shell\build.gradle'.
C/C++: android.ndkVersion from module build.gradle is [25.2.9519653]
C/C++: android.ndkPath from module build.gradle is not set
C/C++: ndk.dir in local.properties is not set
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is D:\AndroidSDK
C/C++: android.ndkVersion from module build.gradle is [25.2.9519653]
C/C++: android.ndkPath from module build.gradle is not set
C/C++: ndk.dir in local.properties is not set
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is D:\AndroidSDK
C/C++: android.ndkVersion from module build.gradle is [25.2.9519653]
C/C++: android.ndkPath from module build.gradle is not set
C/C++: ndk.dir in local.properties is not set
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is D:\AndroidSDK
C/C++: android.ndkVersion from module build.gradle is [25.2.9519653]
C/C++: android.ndkPath from module build.gradle is not set
C/C++: ndk.dir in local.properties is not set
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is D:\AndroidSDK
C/C++: android.ndkVersion from module build.gradle is [25.2.9519653]
C/C++: android.ndkPath from module build.gradle is not set
C/C++: ndk.dir in local.properties is not set
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is D:\AndroidSDK
C/C++: android.ndkVersion from module build.gradle is [25.2.9519653]
C/C++: android.ndkPath from module build.gradle is not set
C/C++: ndk.dir in local.properties is not set
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is D:\AndroidSDK

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':shell'.
> Failed to notify project evaluation listener.
   > Could not create task ':shell:transformClassesWithJunkCodeTransformForDebug'.
      > Cannot use @TaskAction annotation on method TransformTask.transform() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
   > Task with name 'assembleRelease' not found in project ':shell'.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 821ms
3 actionable tasks: 3 up-to-date
Watched directory hierarchies: [F:\project\Java\DexEnc-dpt-shell]
luoyesiqiu commented 2 months ago

Junk code plugin use transform API, but Gradle 8.0 already removed it. If you want to build this project, you need to use lower version JDK and use Gradle 7.x.

VanHoevenTR commented 2 months ago

Ok, i modified gradlew.bat to use older jdk and it works now