Closed drelaptop closed 6 years ago
please review and merge @minggo
correspond issue, https://github.com/cocos2d/cocos2d-x/issues/18790
key is only needed for Android APK, it is not needed for generating libs, so i don't think the parameter is needed.
Yes, it's not needed for gen-libs, but now cocos gen-libs -p android -m release
need user to input key info. so add a no-sign
to avoid gen-libs
to use keystore file.
what i mean is that, should fix the logic to avoid checking key info instead of adding a new parameter.
the cocos gen-libs
is finished by call cocos compile
cmd, and copy the libs to some dir, add a new parameter to cocos compile
is a convenient way for cocos gen-libs
to control. And this new parameter didn't break the older compile logic.
find another way to fix the logic will cause to more code changes, I will find another way to compare with this way if you stick to.
Yep, i think should put the logic of compiling libs in one function, for example named compile_cpp_codes()
, then cocos gen-libs
and cocos compile
can use the same logic.
after I review the project_compile.py
and build_android.py
again, I think it's not a good choice to put the compile logic into a function.
the implement now use many member variables, which values is gotten from cocos compile
cmd line. to put all compile logic into a function, and then call when gen libs, so that we will have to set members values manually in gen_libs.py
. Another reason I think --no-sign
is a good optional parameter for android compile, sign infos are not necessary for Android release compile process, it's only necessary when run release apk into android device. Gradle don't ask developer to input sign infos before release compile process, but cocos console asked.
@minggo PR looks good for me. Could you merge it?
fix, https://github.com/cocos2d/cocos2d-x/issues/18790