Ensure build native first before compile java code

3ff5b16
This commit is contained in:
halx99 2021-04-20 20:27:38 +08:00
parent 3ff5b16847
commit 4a1405e79f
1 changed files with 5 additions and 5 deletions

View File

@ -101,6 +101,11 @@ android.applicationVariants.all { variant ->
tasks.getByName("pre${targetName}Build").dependsOn copyTaskName tasks.getByName("pre${targetName}Build").dependsOn copyTaskName
} }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':libcocos2dx')
}
project.afterEvaluate { project.afterEvaluate {
if (tasks.findByName("externalNativeBuildDebug")) { if (tasks.findByName("externalNativeBuildDebug")) {
compileDebugJavaWithJavac.dependsOn externalNativeBuildDebug compileDebugJavaWithJavac.dependsOn externalNativeBuildDebug
@ -109,8 +114,3 @@ project.afterEvaluate {
compileReleaseJavaWithJavac.dependsOn externalNativeBuildRelease compileReleaseJavaWithJavac.dependsOn externalNativeBuildRelease
} }
} }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':libcocos2dx')
}