Loading .github/workflows/build.yml +6 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ jobs: build: name: "Gradle build" runs-on: ubuntu-latest env: GRADLE_MICROG_VERSION_WITHOUT_GIT: 1 steps: - name: "Checkout sources" Loading Loading @@ -41,7 +43,9 @@ jobs: echo "Matcher configured: ${NAME:?}" fi done - name: "Inspect Gradle tasks" run: "./gradlew tasks" - name: "Execute Gradle assemble" run: "./gradlew --no-daemon assemble" run: "./gradlew assemble" - name: "Execute Gradle check" run: "./gradlew --no-daemon check" run: "./gradlew check" build.gradle +17 −14 Original line number Diff line number Diff line Loading @@ -67,14 +67,16 @@ def execResult(... args) { providers.exec { commandLine args }.standardOutput.asText.get() } def ignoreGit = providers.environmentVariable('GRADLE_MICROG_VERSION_WITHOUT_GIT').getOrElse('0') == '1' def gmsVersion = "24.09.13" def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', '')) def vendingVersion = "40.2.26" def vendingVersionCode = Integer.parseInt(vendingVersion.replaceAll('\\.', '')) def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] def gitVersionBase = !ignoreGit ? execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) : "v0.0.0.$gmsVersionCode" def gitCommitCount = !ignoreGit ? Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) : 0 def gitCommitId = !ignoreGit ? execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] : '0000000' def gitDirty = false if (!ignoreGit) { execResult('git', 'status', '--porcelain').lines().each { stat -> def status = stat.substring(0,2) def file = stat.substring(3) Loading @@ -90,6 +92,7 @@ execResult('git', 'status', '--porcelain').lines().each { stat -> gitDirty = true } } } def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.')) def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1)) def ourGmsVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0) Loading gradle.properties +2 −1 Original line number Diff line number Diff line android.useAndroidX=true org.gradle.configuration-cache=true org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED org.gradle.caching=true org.gradle.jvmargs=-Xmx4096m -XX:+UseParallelGC --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED Loading
.github/workflows/build.yml +6 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ jobs: build: name: "Gradle build" runs-on: ubuntu-latest env: GRADLE_MICROG_VERSION_WITHOUT_GIT: 1 steps: - name: "Checkout sources" Loading Loading @@ -41,7 +43,9 @@ jobs: echo "Matcher configured: ${NAME:?}" fi done - name: "Inspect Gradle tasks" run: "./gradlew tasks" - name: "Execute Gradle assemble" run: "./gradlew --no-daemon assemble" run: "./gradlew assemble" - name: "Execute Gradle check" run: "./gradlew --no-daemon check" run: "./gradlew check"
build.gradle +17 −14 Original line number Diff line number Diff line Loading @@ -67,14 +67,16 @@ def execResult(... args) { providers.exec { commandLine args }.standardOutput.asText.get() } def ignoreGit = providers.environmentVariable('GRADLE_MICROG_VERSION_WITHOUT_GIT').getOrElse('0') == '1' def gmsVersion = "24.09.13" def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', '')) def vendingVersion = "40.2.26" def vendingVersionCode = Integer.parseInt(vendingVersion.replaceAll('\\.', '')) def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] def gitVersionBase = !ignoreGit ? execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) : "v0.0.0.$gmsVersionCode" def gitCommitCount = !ignoreGit ? Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) : 0 def gitCommitId = !ignoreGit ? execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] : '0000000' def gitDirty = false if (!ignoreGit) { execResult('git', 'status', '--porcelain').lines().each { stat -> def status = stat.substring(0,2) def file = stat.substring(3) Loading @@ -90,6 +92,7 @@ execResult('git', 'status', '--porcelain').lines().each { stat -> gitDirty = true } } } def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.')) def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1)) def ourGmsVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0) Loading
gradle.properties +2 −1 Original line number Diff line number Diff line android.useAndroidX=true org.gradle.configuration-cache=true org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED org.gradle.caching=true org.gradle.jvmargs=-Xmx4096m -XX:+UseParallelGC --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED