Jitpack.io: [Question] Exclude specific submodules

Created on 25 Jul 2017  路  2Comments  路  Source: jitpack/jitpack.io

I have a library with many submodules, and one of them is a sample app. I automate building it through travis and I have private encrypted files that are used to sign the app. This module is not necessary for the library, but Jitpack will still try to compile it and fail because the files are still encrypted. Is there any way to "ignore" the module?

As of now the workaround is to check if the file exists first and ignore signing if it doesn't

Most helpful comment

One option is to configure your build to exclude the module when it is being built on JitPack.
All builds have an environment variable "JITPACK" that is set to "true" that your build can check.

All 2 comments

One option is to configure your build to exclude the module when it is being built on JitPack.
All builds have an environment variable "JITPACK" that is set to "true" that your build can check.

Thank you. I've resolved this by simply adding

if (!System.env.JITPACK)
    include ':sample'

For future reference for other devs, the environment variables are specified here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jitpack-io picture jitpack-io  路  7Comments

leahjlou picture leahjlou  路  4Comments

vananiev picture vananiev  路  5Comments

rumatoest picture rumatoest  路  5Comments

SilenceDut picture SilenceDut  路  4Comments