File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424 - name : Build Web Assets (Vite)
2525 run : npm run build
26- env :
27- CAPACITOR_BUILD : ' true'
2826
2927 - name : Generate Android Assets (Icon/Splash)
3028 run : npx -y @capacitor/assets generate --android
@@ -44,18 +42,11 @@ jobs:
4442 - name : Sync Capacitor
4543 run : npx cap sync android
4644
47- - name : Set Version Code
48- run : echo "ANDROID_VERSION_CODE=$((GITHUB_RUN_NUMBER + 100))" >> $GITHUB_ENV
49- env :
50- GITHUB_RUN_NUMBER : ${{ github.run_number }}
51-
5245 - name : Build with Gradle
5346 run : |
5447 cd android
5548 chmod +x gradlew
5649 ./gradlew assembleRelease
57- env :
58- ANDROID_VERSION_CODE : ${{ env.ANDROID_VERSION_CODE }}
5950
6051 - name : Sign APK
6152 id : sign_app
Original file line number Diff line number Diff line change 2525
2626 - name : Build
2727 run : npm run build
28+ env :
29+ VITE_BASE : /PaperKnife/
2830
2931 - name : Deploy
3032 uses : JamesIves/github-pages-deploy-action@v4
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.application'
22
3+ import groovy.json.JsonSlurper
4+
5+ def getPackageJson () {
6+ def inputFile = new File (project. rootDir, ' ../package.json' )
7+ return new JsonSlurper (). parseText(inputFile. text)
8+ }
9+
10+ def packageJson = getPackageJson()
11+
312android {
4- namespace = " com.paperknife.app"
5- compileSdk = rootProject. ext. compileSdkVersion
13+ namespace " com.paperknife.app"
14+ compileSdk rootProject. ext. compileSdkVersion
615 defaultConfig {
716 applicationId " com.paperknife.app"
817 minSdkVersion rootProject. ext. minSdkVersion
918 targetSdkVersion rootProject. ext. targetSdkVersion
10- versionCode 101
11- versionName " 1.0.1 "
19+ versionCode (packageJson . version . split( ' - ' )[ 0 ] . split( ' \\ . ' ) . collect { it . toInteger() } . with { (it[ 0 ] * 10000 ) + (it[ 1 ] * 100 ) + it[ 2 ] })
20+ versionName packageJson . version
1221 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1322 aaptOptions {
1423 // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default defineConfig({
66 plugins : [
77 react ( )
88 ] ,
9- base : process . env . CAPACITOR_BUILD === 'true' ? './' : '/PaperKnife /',
9+ base : process . env . VITE_BASE || '. /',
1010 server : {
1111 host : true
1212 } ,
You can’t perform that action at this time.
0 commit comments