Skip to content

Commit

Permalink
Prepare for 0.8.0 release and bump Gradle to 8.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
skalarproduktraum committed Jun 10, 2023
1 parent d5d2e1b commit 0cbb711
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 40 deletions.
30 changes: 8 additions & 22 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ plugins {
id("org.jetbrains.dokka")

scenery.base
// scenery.docs
scenery.publish
scenery.sign
// id("com.github.elect86.sciJava") version "0.0.4"
jacoco
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.github.johnrengelman.shadow") apply false
}

repositories {
Expand Down Expand Up @@ -139,7 +138,6 @@ val isRelease: Boolean
get() = System.getProperty("release") == "true"

tasks {

withType<KotlinCompile>().all {
kotlinOptions {
jvmTarget = project.properties["jvmTarget"]?.toString() ?: "11"
Expand Down Expand Up @@ -379,27 +377,15 @@ tasks {
}
}

shadowJar {
isZip64 = true
dokkaJavadoc {
enabled = isRelease
}
}

val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.get().outputDirectory.get())
archiveClassifier.set("javadoc")
}

val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.get().outputDirectory.get())
archiveClassifier.set("html-doc")
}

artifacts {
if(isRelease) {
archives(dokkaJavadocJar)
archives(dokkaHtmlJar)
if(project.properties["buildFatJAR"] == true) {
apply(plugin = "com.github.johnrengelman.shadow")
jar {
isZip64 = true
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ plugins {

repositories {
mavenCentral()
gradlePluginPortal()
// jcenter() // or maven(url="https://dl.bintray.com/kotlin/dokka")
}

dependencies {
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.20")
}

//, imagej, imgLib2, scifio, fiji, bigDataViewer, trakEM2, n5, boneJ, ome, omero,
//groovy, apache, batik, commons, eclipseCollections, eclipseSwt, googleCloud, jackson,
//jetty, jGraphT, jna, jogamp, kotlib, logBack, migLayout, rSyntaxTextArea, slf4j,
Expand Down
47 changes: 43 additions & 4 deletions buildSrc/src/main/kotlin/scenery/publish.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
package scenery

import java.net.URL

// configuration of the Maven artifacts
plugins {
`maven-publish`
// id("org.jetbrains.dokka")
id("org.jetbrains.dokka")
}

val sceneryUrl = "http://scenery.graphics"


tasks {
dokkaHtml {
dokkaSourceSets.configureEach {
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/master/src/main/kotlin"))
remoteLineSuffix.set("#L")
}
}
}
dokkaJavadoc {
dokkaSourceSets.configureEach {
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/master/src/main/kotlin"))
remoteLineSuffix.set("#L")
}
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
Expand All @@ -17,6 +40,21 @@ publishing {

from(components["java"])

val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}

val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.flatMap { it.outputDirectory })
archiveClassifier.set("html-doc")
}


artifact(dokkaJavadocJar)
artifact(dokkaHtmlJar)
// TODO, resolved dependencies versions? https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:resolved_dependencies

pom {
Expand Down Expand Up @@ -93,8 +131,9 @@ publishing {
// <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
// </repository>
}
// artifact("${rootProject.name}-${rootProject.version}-sources.jar")
// artifact("${rootProject.name}-${rootProject.version}-javadoc.jar")

// artifact("${rootProject.name}-${rootProject.version}-sources.jar")
// artifact("${rootProject.name}-${rootProject.version}-javadoc.jar")
}
}
}
Expand Down Expand Up @@ -134,4 +173,4 @@ publishing {
// archives(dokkaJavadocJar)
// archives(dokkaHtmlJar)
// archives(sourceJar)
//}
//}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions 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-bin.zip
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7
18 changes: 14 additions & 4 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,10 +80,10 @@ 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##*/}
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"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
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 @@ -205,6 +209,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.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal

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

Expand All @@ -40,7 +41,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.
Expand Down Expand Up @@ -75,13 +76,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
Expand Down
18 changes: 16 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

pluginManagement {
val kotlinVersion: String by settings
val dokkaVersion: String by settings
Expand All @@ -7,17 +6,32 @@ pluginManagement {
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
id("org.jetbrains.dokka") version dokkaVersion

id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
gradlePluginPortal()
}
}

//buildscript {
// val dokkaVersion: String by settings
//
// dependencies {
// classpath("org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion")
// }
//
// repositories {
// mavenCentral()
// gradlePluginPortal()
// }
//}

rootProject.name = "scenery"

gradle.rootProject {
group = "graphics.scenery"
version = "0.7.0-beta-8-SNAPSHOT-00"
version = "0.8.0"
description = "flexible scenegraphing and rendering for scientific visualisation"
}

0 comments on commit 0cbb711

Please sign in to comment.