( config: Config, buildOptions: BuildCommandOptions, releasePath: string, signedReleaseName: string, unsignedReleaseName: string, )
| 103 | } |
| 104 | |
| 105 | async function signWithJarSigner( |
| 106 | config: Config, |
| 107 | buildOptions: BuildCommandOptions, |
| 108 | releasePath: string, |
| 109 | signedReleaseName: string, |
| 110 | unsignedReleaseName: string, |
| 111 | ) { |
| 112 | if ( |
| 113 | !buildOptions.keystorepath || |
| 114 | !buildOptions.keystorealias || |
| 115 | !buildOptions.keystorealiaspass || |
| 116 | !buildOptions.keystorepass |
| 117 | ) { |
| 118 | throw 'Missing options. Please supply all options for android signing. (Keystore Path, Keystore Password, Keystore Key Alias, Keystore Key Password)'; |
| 119 | } |
| 120 | |
| 121 | const signingArgs = [ |
| 122 | '-sigalg', |
| 123 | 'SHA1withRSA', |
| 124 | '-digestalg', |
| 125 | 'SHA1', |
| 126 | '-keystore', |
| 127 | buildOptions.keystorepath, |
| 128 | '-keypass', |
| 129 | buildOptions.keystorealiaspass, |
| 130 | '-storepass', |
| 131 | buildOptions.keystorepass, |
| 132 | `-signedjar`, |
| 133 | `${join(releasePath, signedReleaseName)}`, |
| 134 | `${join(releasePath, unsignedReleaseName)}`, |
| 135 | buildOptions.keystorealias, |
| 136 | ]; |
| 137 | |
| 138 | await runTask('Signing Release', async () => { |
| 139 | await runCommand('jarsigner', signingArgs, { |
| 140 | cwd: config.android.platformDirAbs, |
| 141 | }); |
| 142 | }); |
| 143 | } |
no test coverage detected