Closed pitoszud closed 3 years ago
I'm getting the same error as you @pitoszud
Is the gradlePath
pointing to the right file?
the error seems like the app/build.gradle is not available
The path and the name of the file are correct. I recently started converting all gradle files from groovy to kotlin. After adding kts extension, it worked. So it should say app/build.gradle.kts
My current internal release is 3 (1.0.3), so I would expect Version Code : 6 to replace the current release.
Testing: Increasing versionCode in gradle to match the number from the GitHub run - this produces the same error.
Run chkfung/android-version-actions@v1.1 with: gradlePath: app/build.gradle versionCode: 6 versionName: 1.0.4 env: JAVA_HOME_11.0.11_x64: /opt/hostedtoolcache/jdk/11.0.11/x64 JAVA_HOME: /opt/hostedtoolcache/jdk/11.0.11/x64 JAVA_HOME_11_0_11_X64: /opt/hostedtoolcache/jdk/11.0.11/x64 Gradle Path : app/build.gradle Version Code : 6 Version Name : 1.0.4 /home/runner/work/_actions/chkfung/android-version-actions/v1.1/index.js:21 newGradle = newGradle.replace(versionCodeRegexPattern,
$1$***versionCode***
); ^TypeError: Cannot read property 'replace' of undefined at ReadFileContext.callback (/home/runner/work/_actions/chkfung/android-version-actions/v1.1/index.js:21:35) at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13)