Skip to content

Commit 5f2d234

Browse files
authored
Exclude "examples" package (#2)
- Disable long running test - Fix capitalization of maven artifact - Update README with installation instructions - Add jar to release on publish-main workflow
2 parents d8ad3c5 + e0ad819 commit 5f2d234

File tree

5 files changed

+38
-4
lines changed

5 files changed

+38
-4
lines changed

.github/workflows/publish-main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ jobs:
2323
gradle-version: 8.13
2424
- name: Publish
2525
run: gradle publishAllPublicationsToMinecrafttasMainRepository -Prelease=true -PminecrafttasMainUsername=${{ secrets.MAVEN_NAME }} -PminecrafttasMainPassword=${{ secrets.MAVEN_SECRET }}
26+
- name: Upload assets
27+
uses: softprops/action-gh-release@v2
28+
with:
29+
files: 'build/libs/!(-@(dev|sources|javadoc|all)).jar'

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ bin
88

99
build/
1010
bin/
11-
memory/
11+
memory/
12+
docs/

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ A BigArrayList is basically an ArrayList that can handle a much larger amount of
77
3. Removing elements from the list
88
4. Sorting the list
99

10+
## Installation
11+
BigArrayList is available under [maven.minecrafttas.com](https://maven.minecrafttas.com/#/main/com/dselent/bigarraylist).
12+
13+
The basic build.gradle configuration should look like this:
14+
```groovy
15+
repositories {
16+
maven { url = "https://maven.minecrafttas.com/main" }
17+
}
18+
19+
dependencies {
20+
implementation "com.dselent:bigarraylist:1.4"
21+
}
22+
```
23+
1024
## BigArrayList Size
1125

1226
The number of elements a BigArrayList can hold is 2^63-1 elements. This number is currently considered a theoretical limit, since it would take too much time and space to store that many elements. A more practical limit would be based on the combination of available RAM and disk space because the amount of space will likely be the limiting factor.
@@ -69,4 +83,4 @@ Some types of serialization will clear the contents on disk automatically when y
6983
You should treat storing any element retrieved from a BigArrayList as if it were a copy-by-value. The reason for this is because the content in a BigArrayList can be serialized and deserialized during any operation. Therefore, upon deserialization, a new object is created. Any old references in the program are now referencing a different object than what is being stored in the BigArrayList. If you retrieve an element from a BigArrayList and change it, make sure to save it back to the list.
7084

7185
## How to Build
72-
Import normally as a Gradle project. The SimpleTest.java file can be run as a standard Java application to test the build.
86+
Import normally as a Gradle project. The SimpleTest.java file can be run as a standard Java application to test the build.

build.gradle

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
plugins {
3-
id 'java'
4-
id 'java-gradle-plugin'
3+
id 'java'
54
id 'maven-publish'
65
}
76

@@ -32,6 +31,14 @@ java {
3231
withJavadocJar()
3332
}
3433

34+
sourceSets {
35+
main {
36+
java {
37+
exclude 'examples/**'
38+
}
39+
}
40+
}
41+
3542
publishing {
3643
repositories {
3744
maven {
@@ -51,4 +58,10 @@ publishing {
5158
}
5259
}
5360
}
61+
publications {
62+
maven(MavenPublication) {
63+
artifactId = "bigarraylist"
64+
from components.java
65+
}
66+
}
5467
}

src/test/java/BigArrayListTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.dselent.bigarraylist.BigArrayList;
88
import org.junit.jupiter.api.AfterEach;
99
import org.junit.jupiter.api.BeforeAll;
10+
import org.junit.jupiter.api.Disabled;
1011
import org.junit.jupiter.api.Test;
1112

1213
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -56,6 +57,7 @@ protected void tearDown() throws Exception
5657
* Monte-carlo test case. Tests random operations on BigArrayLists with parameters randomized within ranges.
5758
*/
5859
@Test
60+
@Disabled
5961
public void testBigArrayList()
6062
{
6163
for(int i=0; i<testRuns; i++)

0 commit comments

Comments
 (0)