Skip to content

Commit ccf68ce

Browse files
committed
chore: update build.gradle.kts
1 parent b8de254 commit ccf68ce

2 files changed

Lines changed: 103 additions & 1 deletion

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
11
# Native List
22

33
Native list is a resizable array backed by `MemorySegment`.
4+
5+
## Usage
6+
7+
```java
8+
void main() {
9+
try (var list = new IntNativeList(ListAllocator::ofConfinedArena)) {
10+
list.add(42);
11+
list.add(43);
12+
assertEquals(42, list.get(0));
13+
assertEquals(43, list.get(1));
14+
} // the list is automatically released
15+
}
16+
```
17+
18+
## Import as Dependency
19+
20+
This library requires JDK 25.
21+
22+
- Maven coordinate: `io.github.over-run:native-list`
23+
- Version: ![Maven Central Version](https://img.shields.io/maven-central/v/io.github.over-run/native-list)
24+
25+
Maven:
26+
27+
```xml
28+
<dependency>
29+
<groupId>io.github.over-run</groupId>
30+
<artifactId>native-list</artifactId>
31+
<version>&lt;nativeListVersion&gt;</version>
32+
</dependency>
33+
```
34+
35+
Gradle:
36+
37+
```kotlin
38+
dependencies {
39+
implementation("io.github.over-run:native-list:<nativeListVersion>")
40+
}
41+
```

build.gradle.kts

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
import org.jreleaser.model.Active
2+
13
plugins {
24
`java-library`
35
idea
46
`maven-publish`
7+
id("org.jreleaser") version "1.23.0"
58
}
69

710
group = "io.github.over-run"
8-
version = "1.0.0-SNAPSHOT"
11+
version = "1.0.0"
912

1013
repositories {
1114
mavenCentral()
@@ -58,13 +61,74 @@ tasks.withType<JavaCompile> {
5861
options.release = 25
5962
}
6063

64+
publishing.repositories {
65+
maven {
66+
name = "staging"
67+
url = uri(layout.buildDirectory.dir("staging-deploy"))
68+
}
69+
}
70+
6171
publishing.publications {
6272
register<MavenPublication>("mavenPublication") {
6373
groupId = project.group.toString()
6474
artifactId = "native-list"
6575
version = project.version.toString()
6676
from(components["java"])
6777
pom {
78+
name = "Native List"
79+
description = "Native list is a resizable array backed by memory segment."
80+
url = "https://github.com/Over-Run/native-list"
81+
licenses {
82+
license {
83+
name = "MIT License"
84+
url = "https://raw.githubusercontent.com/Over-Run/native-list/refs/heads/main/LICENSE"
85+
}
86+
}
87+
developers {
88+
developer {
89+
name = "squid233"
90+
organization = "Overrun Organization"
91+
organizationUrl = "https://github.com/Over-Run"
92+
}
93+
}
94+
scm {
95+
connection = "scm:git:git://github.com/Over-Run/native-list.git"
96+
developerConnection = "scm:git:ssh://github.com:Over-Run/native-list.git"
97+
url = "https://github.com/Over-Run/native-list"
98+
}
99+
}
100+
}
101+
}
102+
103+
jreleaser {
104+
signing {
105+
pgp {
106+
active = Active.ALWAYS
107+
armored = true
108+
}
109+
}
110+
deploy {
111+
maven {
112+
mavenCentral {
113+
mavenCentral {
114+
register("release-deploy") {
115+
active = Active.RELEASE
116+
url = "https://central.sonatype.com/api/v1/publisher"
117+
stagingRepository("build/staging-deploy")
118+
}
119+
}
120+
nexus2 {
121+
register("snapshot-deploy") {
122+
active = Active.SNAPSHOT
123+
snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
124+
applyMavenCentralRules = true
125+
snapshotSupported = true
126+
closeRepository = true
127+
releaseRepository = true
128+
stagingRepository("build/staging-deploy")
129+
}
130+
}
131+
}
68132
}
69133
}
70134
}

0 commit comments

Comments
 (0)