>
> Hi,
>
     I've resolved this problem. game project will include addon project. 
so first, i need to define artifacts in addon project, 
  project(':addon') {
    apply plugin: 'android'

    configurations {
        merge
    }

    android.applicationVariants.all { variant ->
        project.artifacts {
            merge file(variant.outputFile)
        }
    }
}

   then, I need to declare dependencies in game project, and create task 
depend on prepareXXXDependencies
project(':game') {
    apply plugin: 'android'

    configurations {
        merge
    }

    dependencies {
        compile project(':sdk-kit'), project(':sdk'), 
project(':libcocos2dx')
        merge project(path: ':addon', configuration: 'merge')
    }
    

    android {
        applicationVariants.all { variant ->
            def taskName = "merge${variant.name.capitalize()}"
            def Copy mergeTask = project.tasks.create(taskName, Copy)
            mergeTask.from { configurations.merge.collect {it} }
            mergeTask.into { project.buildDir.getPath() + '/assets/' + 
variant.dirName }
            mergeTask.include { it.file ==~ 
"(.*)addon-${stage}-${variant.buildType.name}-.*\\.apk" }
            mergeTask.rename '(.*)addon-.*?.apk', '$1addon.apk'
            
            
project.("prepare${variant.name.capitalize()}Dependencies").dependsOn(taskName)
        }
    }
}






-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to