diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index a6525ab..5f79740 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -23,3 +23,7 @@ jobs: gradle-version: 8.13 - name: Publish run: gradle publishAllPublicationsToMinecrafttasMainRepository -Prelease=true -PminecrafttasMainUsername=${{ secrets.MAVEN_NAME }} -PminecrafttasMainPassword=${{ secrets.MAVEN_SECRET }} + - name: Upload assets + uses: softprops/action-gh-release@v2 + with: + files: 'build/libs/!(-@(dev|sources|javadoc|all)).jar' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0947f64..cc787cb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ bin build/ bin/ -memory/ \ No newline at end of file +memory/ +docs/ \ No newline at end of file diff --git a/README.md b/README.md index 0332ff0..fb9d343 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,20 @@ A BigArrayList is basically an ArrayList that can handle a much larger amount of 3. Removing elements from the list 4. Sorting the list +## Installation +BigArrayList is available under [maven.minecrafttas.com](https://maven.minecrafttas.com/#/main/com/dselent/bigarraylist). + +The basic build.gradle configuration should look like this: +```groovy +repositories { + maven { url = "https://maven.minecrafttas.com/main" } +} + +dependencies { + implementation "com.dselent:bigarraylist:1.4" +} +``` + ## BigArrayList Size 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 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. ## How to Build -Import normally as a Gradle project. The SimpleTest.java file can be run as a standard Java application to test the build. +Import normally as a Gradle project. The SimpleTest.java file can be run as a standard Java application to test the build. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 240c211..4f6ce71 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,6 @@ plugins { - id 'java' - id 'java-gradle-plugin' + id 'java' id 'maven-publish' } @@ -32,6 +31,14 @@ java { withJavadocJar() } +sourceSets { + main { + java { + exclude 'examples/**' + } + } +} + publishing { repositories { maven { @@ -51,4 +58,10 @@ publishing { } } } + publications { + maven(MavenPublication) { + artifactId = "bigarraylist" + from components.java + } + } } diff --git a/src/test/java/BigArrayListTest.java b/src/test/java/BigArrayListTest.java index 3470fe9..9019844 100644 --- a/src/test/java/BigArrayListTest.java +++ b/src/test/java/BigArrayListTest.java @@ -7,6 +7,7 @@ import com.dselent.bigarraylist.BigArrayList; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -56,6 +57,7 @@ protected void tearDown() throws Exception * Monte-carlo test case. Tests random operations on BigArrayLists with parameters randomized within ranges. */ @Test + @Disabled public void testBigArrayList() { for(int i=0; i