Browse Source

Build: Update gradle to version 8.1.1

pull/345/head
Jannis Weis 2 years ago
parent
commit
5ba39ced05
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 8
      build.gradle.kts
  2. 6
      buildSrc/src/main/kotlin/GenerateIconAccessor.kt
  3. 3
      buildSrc/src/main/kotlin/JniUtils.kt
  4. BIN
      gradle/wrapper/gradle-wrapper.jar
  5. 2
      gradle/wrapper/gradle-wrapper.properties
  6. 16
      gradlew
  7. 10
      gradlew.bat
  8. 1
      settings.gradle.kts

8
build.gradle.kts

@ -7,6 +7,7 @@ import com.github.vlsi.gradle.publishing.dsl.simplifyXml
import com.github.vlsi.gradle.publishing.dsl.versionFromResolution
import net.ltgt.gradle.errorprone.errorprone
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.util.*
plugins {
idea
@ -325,7 +326,12 @@ allprojects {
)
name.set(
(project.findProperty("artifact.name") as? String)
?: project.name.capitalize().replace("-", " ")
?: project.name
.replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault())
else it.toString()
}
.replace("-", " ")
)
url.set("https://github.com/weisJ/darklaf")
organization {

6
buildSrc/src/main/kotlin/GenerateIconAccessor.kt

@ -50,9 +50,13 @@ fun createIconAccessor(propertyFile: File, packageName : String, className: Stri
val subNodes = node.nodes.entries.asSequence().sortedBy { it.key }.joinToString(separator = "\n\n") {
createAccessorClass(it.key, it.value)
}.replace("\n", "\n ")
val capitalizedName = name.replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault())
else it.toString()
}
return """
|@javax.annotation.Generated(value = {"GenerateIconAccessor"})
|public ${if (topLevel) "" else "static "}final class ${name.capitalize()} {
|public ${if (topLevel) "" else "static "}final class ${capitalizedName} {
| $properties
| $subNodes
|}

3
buildSrc/src/main/kotlin/JniUtils.kt

@ -11,6 +11,7 @@ import org.gradle.api.provider.Provider
import org.gradle.nativeplatform.toolchain.Clang
import org.gradle.nativeplatform.toolchain.Gcc
import org.gradle.nativeplatform.toolchain.VisualCpp
import java.util.*
typealias OSFamily = org.gradle.nativeplatform.OperatingSystemFamily
@ -48,7 +49,7 @@ val TargetMachine.architectureString: String
val TargetMachine.targetsHost: Boolean
get() {
val osName = System.getProperty("os.name").toLowerCase().replace(" ", "")
val osName = System.getProperty("os.name").lowercase(Locale.getDefault()).replace(" ", "")
val osFamily = operatingSystemFamily
return when {
osFamily.isWindows && osName.contains(OSFamily.WINDOWS) -> true

BIN
gradle/wrapper/gradle-wrapper.jar vendored

Binary file not shown.

2
gradle/wrapper/gradle-wrapper.properties vendored

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

16
gradlew vendored

@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

10
gradlew.bat vendored

@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

1
settings.gradle.kts

@ -1,5 +1,4 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("VERSION_CATALOGS")
rootProject.name = "darklaf"
pluginManagement {

Loading…
Cancel
Save