Skip to content

Commit

Permalink
Dependency updates and modernization (#1114)
Browse files Browse the repository at this point in the history
Co-authored-by: Goooler <[email protected]>
  • Loading branch information
Goooler authored Dec 14, 2023
1 parent 04cf600 commit 6eda642
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 115 deletions.
74 changes: 22 additions & 52 deletions .github/workflows/cid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,14 @@ jobs:
is_snapshot: ${{ steps.setup.outputs.is_snapshot }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: 17
- name: Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-v2-gradle-build-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-v2-gradle-build-
${{ runner.os }}-v2-gradle-
uses: gradle/gradle-build-action@v2
- name: Validate Gradle integrity
uses: gradle/wrapper-validation-action@v1
- name: Setup environment
Expand All @@ -40,21 +33,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: 17
- name: Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-v2-gradle-test-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-v2-gradle-test-
${{ runner.os }}-v2-gradle-
uses: gradle/gradle-build-action@v2
- name: Setup environment
run: ./gradlew publishToMavenLocal
- name: Run tests
Expand All @@ -63,25 +49,17 @@ jobs:
deploy_snapshot:
needs: [build, test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && needs.build.outputs.is_snapshot == 'true'
if: github.repository == 'Triple-T/gradle-play-publisher' && github.ref == 'refs/heads/master' && needs.build.outputs.is_snapshot == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: 17
- name: Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-v2-gradle-deploy-snapshot-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-v2-gradle-deploy-snapshot-
${{ runner.os }}-v2-gradle-deploy-
${{ runner.os }}-v2-gradle-
uses: gradle/gradle-build-action@v2
- name: Build project
run: ./gradlew assemble
- name: Publish snapshot
Expand All @@ -93,25 +71,17 @@ jobs:
deploy_release:
needs: [build, test]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
if: github.repository == 'Triple-T/gradle-play-publisher' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: 17
- name: Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-v2-gradle-deploy-release-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-v2-gradle-deploy-release-
${{ runner.os }}-v2-gradle-deploy-
${{ runner.os }}-v2-gradle-
uses: gradle/gradle-build-action@v2
- name: Build project
run: ./gradlew assemble
- name: Publish release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v9
with:
days-before-stale: 7
stale-issue-label: waiting-for-reply
Expand Down
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ buildScan {
publishAlways()
}

tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}

tasks.register("configureGithubActions") {
doLast {
println("::set-output name=is_snapshot::$isSnapshotBuild")
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ class PlayPublisherPluginIntegrationTest : IntegrationTestBase() {
}
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.example.publisher"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -637,13 +637,13 @@ class PlayPublisherPluginIntegrationTest : IntegrationTestBase() {
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.supercilex.test"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -715,13 +715,13 @@ class PlayPublisherPluginIntegrationTest : IntegrationTestBase() {
apply plugin: 'com.bugsnag.android.gradle'
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.supercilex.test"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ abstract class IntegrationTestBase(
}
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.example.publisher"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ class ProcessArtifactVersionCodesIntegrationTest : IntegrationTestBase(), Shared
}
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.example.publisher"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -167,13 +167,13 @@ class ProcessArtifactVersionCodesIntegrationTest : IntegrationTestBase(), Shared
}
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.example.publisher"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -237,13 +237,13 @@ class ProcessArtifactVersionCodesIntegrationTest : IntegrationTestBase(), Shared
}
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.example.publisher"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ interface ArtifactIntegrationTests : SharedIntegrationTest {
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdk 31
compileSdk 34
namespace = "com.example.publisher"
defaultConfig {
applicationId "com.supercilex.test"
minSdk 31
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"
}
Expand Down
24 changes: 12 additions & 12 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ dependencyResolutionManagement {

versionCatalogs {
create("libs") {
version("depUpdates", "0.39.0")
version("gradlePublish", "1.1.0")
version("nexusPublish", "1.1.0")
version("depUpdates", "0.50.0")
version("gradlePublish", "1.2.1")
version("nexusPublish", "1.3.0")

plugin("depUpdates", "com.github.ben-manes.versions")
.versionRef("depUpdates")
Expand All @@ -36,13 +36,13 @@ dependencyResolutionManagement {
plugin("nexusPublish", "io.github.gradle-nexus.publish-plugin")
.versionRef("nexusPublish")

version("agp", "8.0.1")
version("agp-tools", "31.0.1")
version("android-publisher", "v3-rev20230615-2.0.0")
version("agp", "8.2.0")
version("agp-tools", "31.2.0")
version("android-publisher", "v3-rev20231115-2.0.0")
version("api-client", "2.2.0")
version("http-client", "1.40.1")
version("http-auth", "1.2.2")
version("guava", "31.0.1-jre")
version("http-client", "1.43.3")
version("http-auth", "1.20.0")
version("guava", "32.1.3-jre")

library("agp", "com.android.tools.build", "gradle").versionRef("agp")
library("agp-test", "com.android.tools.build", "builder-test-api").versionRef("agp")
Expand All @@ -62,9 +62,9 @@ dependencyResolutionManagement {
}

create("testLibs") {
version("junit", "5.8.1")
version("truth", "1.1.3")
version("mockito", "4.0.0")
version("junit", "5.10.1")
version("truth", "1.1.5")
version("mockito", "5.8.0")

library("junit", "org.junit.jupiter", "junit-jupiter-api").versionRef("junit")
library("junit-engine", "org.junit.jupiter", "junit-jupiter-engine")
Expand Down
Loading

0 comments on commit 6eda642

Please sign in to comment.