Skip to content

Commit

Permalink
docs: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Jan 26, 2025
1 parent 052ed3c commit db29133
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 18 deletions.
41 changes: 24 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jreleaser.model.Active

/*
* MIT License
*
Expand All @@ -17,7 +19,7 @@
plugins {
`java-platform`
`maven-publish`
signing
id("org.jreleaser") version "1.16.0"
}

val projGroupId: String by rootProject
Expand Down Expand Up @@ -77,26 +79,31 @@ publishing.publications {
}
}

// You have to add `OSSRH_USERNAME`, `OSSRH_PASSWORD`, `signing.keyId`,
// `signing.password` and `signing.secretKeyRingFile` to
// GRADLE_USER_HOME/gradle.properties
publishing.repositories {
maven {
name = "OSSRH"
credentials {
username = project.findProperty("OSSRH_USERNAME").toString()
password = project.findProperty("OSSRH_PASSWORD").toString()
}
url = uri(
if (projVersion.endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
setUrl(layout.buildDirectory.dir("staging-deploy"))
}
mavenLocal()
}

signing {
if (!projVersion.endsWith("-SNAPSHOT") && System.getProperty("gpg.signing", "true").toBoolean())
sign(publishing.publications)
// check https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
jreleaser {
signing {
active = Active.ALWAYS
armored = true
}
deploy {
release {
github.enabled = false
}
maven {
mavenCentral {
create("sonatype") {
active = Active.ALWAYS
url = "https://central.sonatype.com/api/v1/publisher"
stagingRepository("build/staging-deploy")
}
}
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8
projGroupId=io.github.over-run
projArtifactId=overrungl
projName=overrungl
projVersion=0.1.0-alpha.0
projVersion=0.1.0-alpha.1
projLicenseYear=2022-2025

jdkVersion=23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@
* This class loads the Vulkan library into the JVM process.
*
* @author squid233
* @see VKLoadFunc
* @since 0.1.0
*/
public final class VK {
private static VKLoadFunc loadFunc;
private static GlobalCommands globalCommands;

private VK() {
}

/// Loads necessary functions for Vulkan to create [VkInstance] with the given loading function.
///
/// @param func a function that returns an address of a Vulkan function specified with the given name. this can be `GLFW::glfwGetInstanceProcAddress`
public static void create(VKLoadFunc func) {
if (loadFunc != null) {
throw new IllegalStateException("Vulkan has already been created.");
Expand All @@ -39,12 +46,14 @@ public static void create(VKLoadFunc func) {
globalCommands = new GlobalCommands(func);
}

/// Removes loaded functions.
public static void destroy() {
if (loadFunc == null) return;
loadFunc = null;
globalCommands = null;
}

/// {@return the function for which Vulkan function is acquired}
public static VKLoadFunc functionLookup() {
return loadFunc;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
import java.lang.foreign.MemorySegment;

/**
* Wraps a Vulkan command buffer handle.
*
* @author squid233
* @since 0.1.0
*/
public class VkCommandBuffer extends VkDispatchableHandleDevice {
private final VkDevice device;

/// Creates a `VkCommandBuffer` using the specified segment and device.
///
/// @param segment the `VkCommandBuffer` segment
/// @param device the device on which the command buffer was created
public VkCommandBuffer(MemorySegment segment, VkDevice device) {
super(segment, device.capabilities());
this.device = device;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
import java.lang.foreign.MemorySegment;

/**
* Wraps a Vulkan device dispatchable handle.
*
* @author squid233
* @since 0.1.0
*/
public class VkDevice extends VkDispatchableHandleDevice {
private final VkPhysicalDevice physicalDevice;

/// Creates a `VkDevice` instance for the specified segment.
///
/// @param segment the `VkDevice` segment
/// @param physicalDevice the physical device used to create the `VkDevice`
public VkDevice(MemorySegment segment, VkPhysicalDevice physicalDevice) {
super(segment, getDeviceCapabilities(segment, physicalDevice));
this.physicalDevice = physicalDevice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ public MemorySegment segment() {
return segment;
}

/// @return the [VKCapabilitiesDevice] instance associated with this dispatchable handle.
public VKCapabilitiesDevice capabilities() {
return capabilities;
}

/// @return the [VKCapabilitiesInstance] instance associated with this dispatchable handle.
public abstract VKCapabilitiesInstance capabilitiesInstance();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.lang.foreign.MemorySegment;

/**
* Base class for Vulkan dispatchable handles.
*
* @author squid233
* @since 0.1.0
*/
Expand All @@ -38,6 +40,7 @@ public MemorySegment segment() {
return segment;
}

/// @return the {@link VKCapabilitiesInstance} instance associated with this dispatchable handle.
public VKCapabilitiesInstance capabilities() {
return capabilities;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
import java.lang.foreign.MemorySegment;

/**
* Wraps a Vulkan instance handle.
*
* @author squid233
* @since 0.1.0
*/
public class VkInstance extends VkDispatchableHandleInstance {
/// Creates a `VkInstance` instance for the specified segment.
///
/// @param segment the `VkInstance` segment
public VkInstance(MemorySegment segment) {
super(segment, getInstanceCapabilities(segment));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
import java.lang.foreign.MemorySegment;

/**
* Wraps a Vulkan physical device handle.
*
* @author squid233
* @since 0.1.0
*/
public class VkPhysicalDevice extends VkDispatchableHandleInstance {
private final VkInstance instance;

/// Creates a `VkPhysicalDevice` using the specified segment and Vulkan instance.
///
/// @param segment the `VkDevice` segment
/// @param instance the Vulkan instance from which the physical device was enumerated
public VkPhysicalDevice(MemorySegment segment, VkInstance instance) {
super(segment, instance.capabilities());
this.instance = instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
import java.lang.foreign.MemorySegment;

/**
* Wraps a Vulkan queue handle.
*
* @author squid233
* @since 0.1.0
*/
public class VkQueue extends VkDispatchableHandleDevice {
private final VkDevice device;

/// Creates a `VkQueue` using the specified segment and device.
///
/// @param segment the `VkQueue` segment
/// @param device the device from which the queue was retrieved
public VkQueue(MemorySegment segment, VkDevice device) {
super(segment, device.capabilities());
this.device = device;
Expand Down

0 comments on commit db29133

Please sign in to comment.