Skip to content

Commit

Permalink
Merge pull request #338 from dlew/dlew/upgrade-project
Browse files Browse the repository at this point in the history
A bunch of QoL upgrades
  • Loading branch information
dlew committed Sep 6, 2023
2 parents c84d234 + 1136db5 commit f957dd7
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ POM_INCEPTION_YEAR=2014
POM_ARTIFACT_ID=android.joda
POM_PACKAGING=aar

android.useAndroidX=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
11 changes: 4 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[versions]
androidx-test = "1.5.0"

[libraries]
android-gradlePlugin = "com.android.tools.build:gradle:7.2.2"
android-gradlePlugin = "com.android.tools.build:gradle:8.1.1"

androidx-annotation = "androidx.annotation:annotation:1.6.0"
androidx-startup = "androidx.startup:startup-runtime:1.1.1"
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test" }
androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test" }
androidx-test-core = "androidx.test:core:1.5.0"
androidx-test-runner = "androidx.test:runner:1.5.2"
androidx-test-rules = "androidx.test:rules:1.5.0"
androidx-test-ext-junit = "androidx.test.ext:junit:1.1.5"

gradleMavenPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.24.0"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\:https://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
25 changes: 17 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# 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,22 +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
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
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# 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, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
8 changes: 5 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ android {
consumerProguardFiles 'proguard-rules.txt'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
namespace 'net.danlew.android.joda'
testNamespace 'net.danlew.android.joda.test'
lint {
lintConfig file('lint.xml')
textOutput file('stdout')
textReport true
textOutput 'stdout'
}

}

apply plugin: net.danlew.android.joda.TzDataPlugin
Expand Down
3 changes: 1 addition & 2 deletions library/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest package="net.danlew.android.joda.test"
xmlns:android="http:https://schemas.android.com/apk/res/android"
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android"
>

<uses-permission android:name="android.permission.WRITE_SETTINGS" />
Expand Down
3 changes: 1 addition & 2 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android"
xmlns:tools="http:https://schemas.android.com/tools"
package="net.danlew.android.joda">
xmlns:tools="http:https://schemas.android.com/tools">

<application>
<provider
Expand Down
12 changes: 2 additions & 10 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,9 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

// We're enabling proguard just to prove we don't have to do anything
// special to get this build to work with proguard.
buildTypes {
debug {
minifyEnabled true
shrinkResources true
}
}
namespace 'net.danlew.android.joda.sample'

lintOptions {
// We don't care THAT much about lint issues with our sample
lint {
abortOnError false
}
}
Expand Down
4 changes: 1 addition & 3 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="net.danlew.android.joda.sample"
xmlns:android="http:https://schemas.android.com/apk/res/android">
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android">

<application
android:icon="@drawable/ic_launcher"
Expand Down

0 comments on commit f957dd7

Please sign in to comment.