Skip to content

1.6.0

Latest

Choose a tag to compare

@Traqueur-dev Traqueur-dev released this 20 Nov 08:15
· 2 commits to main since this release
d0eea93

πŸ”§ Structura v1.6.0 – Migration to GroupeZ Repository & DateTime Support

Streamlined publishing infrastructure and enhanced temporal type support.


✨ New Features

πŸ“… LocalDateTime Support

Added native support for LocalDateTime conversion, complementing the existing LocalDate functionality.

public record Event(
    LocalDate date,
    LocalDateTime timestamp  // ✨ Now supported!
) implements Loadable {}

YAML:

date: 2023-10-05
timestamp: 2023-10-05T14:30:00
  • Automatic parsing of ISO-8601 datetime strings
  • Seamless integration with existing temporal type handling
  • Full bidirectional conversion support

πŸ—οΈ Infrastructure Changes

πŸ”„ Migration to GroupeZ Maven Repository

Structura now publishes to the official GroupeZ Maven repository, replacing JitPack for more reliable and faster artifact distribution.

New Repository Configuration:

repositories {
    maven { 
        url = "https://repo.groupez.dev/releases"  // For stable releases
        // Use "snapshots" instead of "releases" for development versions
    }
}

dependencies {
implementation("fr.traqueur:structura:<VERSION>") // New coordinates
implementation("org.yaml:snakeyaml:2.4")
}

Old Configuration (Deprecated):

repositories {
    maven { url = "https://jitpack.io" }  // ❌ No longer used
}

dependencies {
implementation("com.github.Traqueur-dev:Structura:<VERSION>") // ❌ Deprecated
}

βš™οΈ Build System Enhancements

GitHub Actions Integration

  • New CI/CD workflow: .github/workflows/build.yml
  • Automated builds: On push to main and develop branches
  • Pull request validation: Builds on PR events (opened, synchronized, reopened)
  • Manual triggers: Via workflow_dispatch
  • Automatic publishing: To GroupeZ Maven on successful builds

Workflow Features:

  • Concurrency control (cancels in-progress builds)
  • Reusable workflow from GroupeZ-dev/actions
  • Maven credential management
  • Discord notifications support (optional)

Gradle Configuration Improvements

  • Shadow JAR: Integrated for uber-jar generation
  • Target folder: Build outputs now go to target/ directory
  • SHA versioning: Support for Git commit-based versioning
  • Custom classifiers: Archive classifier support for variant builds
  • GroupeZ publish plugin: Simplified publishing with re.alwyn974.groupez.publish v1.0.0

Gradle Wrapper Update

  • Version: 8.10 β†’ 8.14
  • Latest features and bug fixes
  • Improved build performance

πŸ”§ Technical Details

ValueConverter Changes

// Added LocalDateTime formatter
private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ISO_LOCAL_DATE_TIME;

// New conversion logic
if (targetType == LocalDateTime.class) {
return LocalDateTime.parse(value.toString(), DATE_TIME_FORMATTER);
}

Build Configuration

plugins {
    id("java-library")
    id("re.alwyn974.groupez.publish") version "1.0.0"  // New
    id("com.gradleup.shadow") version "9.0.0-beta11"   // New
}

group = "fr.traqueur"
version = property("version") as String

// SHA-based versioning support
rootProject.extra.properties["sha"]?.let { sha ->
version = sha
}

// Shadow JAR configuration
tasks.shadowJar {
archiveClassifier.set("")
destinationDirectory.set(rootProject.extra["targetFolder"] as File)
}

tasks.build {
dependsOn(tasks.shadowJar)
}

// Publish configuration
publishConfig {
githubOwner = "Traqueur-dev"
useRootProjectName = true
}

Settings Configuration

pluginManagement {
    repositories {
        maven {
            name = "groupezReleases"
            url = uri("https://repo.groupez.dev/releases")
        }
        gradlePluginPortal()
    }
}

πŸ§ͺ Testing

New Test: LocalDateTime Conversion

@Test
@DisplayName("Should handle LocalDateTime conversion from string")
void shouldHandleLocalDateTimeConversion() {
    var localDate = LocalDateTime.of(2023, 10, 5, 14, 30, 0);
    assertEquals(localDate, valueConverter.convert("2023-10-05T14:30:00", LocalDateTime.class, "test"));
}

πŸ“‹ Migration Guide

For Existing Users

Step 1: Update your repository configuration

Replace:

repositories {
    maven { url = "https://jitpack.io" }
}

With:

repositories {
    maven { url = "https://repo.groupez.dev/releases" }
}

Step 2: Update your dependency coordinates

Replace:

implementation("com.github.Traqueur-dev:Structura:<VERSION>")

With:

implementation("fr.traqueur:structura:<VERSION>")

Step 3: (Optional) Use LocalDateTime

If you need timestamp precision beyond date-only values:

// Before
public record Event(LocalDate timestamp) implements Loadable {}

// After
public record Event(LocalDateTime timestamp) implements Loadable {}

# Before
timestamp: 2023-10-05

# After
timestamp: 2023-10-05T14:30:00

πŸ“Š Comparison: Repository Hosting

Feature JitPack (Old) GroupeZ Maven (New)
Build Speed Slow (on-demand) Fast (pre-built)
Reliability Variable High
Cache Performance Poor Excellent
Custom Versioning Limited Full support
CI/CD Integration Manual Automated
Snapshot Support Basic Native

🎯 Benefits

For Users

  • βœ… Faster downloads: Pre-built artifacts with better CDN distribution
  • βœ… Better reliability: Dedicated infrastructure with guaranteed uptime
  • βœ… Snapshot support: Access to development versions via snapshots repository
  • βœ… Enhanced DateTime: More precise temporal data with LocalDateTime

For Contributors

  • βœ… Automated publishing: No manual release process
  • βœ… Better testing: Integrated CI/CD with PR validation
  • βœ… Version management: Git SHA-based versioning for development builds
  • βœ… Simplified workflows: Reusable GitHub Actions

⚠️ Breaking Changes

Repository Migration

  • Old URL: https://jitpack.io β†’ No longer maintained
  • Old coordinates: com.github.Traqueur-dev:Structura β†’ Deprecated
  • New URL: https://repo.groupez.dev/releases
  • New coordinates: fr.traqueur:structura

Note: Version 1.6.0 is the first version available on GroupeZ Maven. Previous versions remain on JitPack but won't receive updates.


πŸ“ Version

1.5.0 β†’ 1.6.0

Changes:

  • ✨ Added LocalDateTime support with ISO-8601 parsing
  • πŸ—οΈ Migrated to GroupeZ Maven repository
  • πŸ”„ Updated dependency coordinates (fr.traqueur:structura)
  • βš™οΈ Added GitHub Actions CI/CD workflow
  • πŸ“¦ Integrated Shadow plugin for uber-JAR generation
  • πŸ”§ Gradle 8.10 β†’ 8.14
  • πŸ”§ Added GroupeZ publish plugin
  • πŸ“‚ Build outputs now go to target/ directory
  • πŸ§ͺ New test for LocalDateTime conversion
  • πŸ“– Updated README with new repository URLs

Full Changelog: https://github.com/Traqueur-dev/Structura/compare/1.5.0...1.6.0


πŸš€ Getting Started

Quick Start with v1.6.0

build.gradle.kts:

repositories {
    mavenCentral()
    maven { url = uri("https://repo.groupez.dev/releases") }
}

dependencies {
implementation("fr.traqueur:structura:1.6.0")
implementation("org.yaml:snakeyaml:2.4")
}

Example Usage:

public record ScheduledTask(
    String name,
    LocalDateTime scheduledAt,
    LocalDate deadline
) implements Loadable {}
tasks:
  - name: "Database Backup"
    scheduled-at: 2025-03-15T02:00:00
    deadline: 2025-03-15
  - name: "Report Generation"
    scheduled-at: 2025-03-20T09:30:00
    deadline: 2025-03-21

πŸ“ž Support

# πŸ”§ Structura v1.6.0 – Migration to GroupeZ Repository & DateTime Support

Streamlined publishing infrastructure and enhanced temporal type support.


✨ New Features

πŸ“… LocalDateTime Support

Added native support for LocalDateTime conversion, complementing the existing LocalDate functionality.

public record Event(
    LocalDate date,
    LocalDateTime timestamp  // ✨ Now supported!
) implements Loadable {}

YAML:

date: 2023-10-05
timestamp: 2023-10-05T14:30:00
  • Automatic parsing of ISO-8601 datetime strings
  • Seamless integration with existing temporal type handling
  • Full bidirectional conversion support

πŸ—οΈ Infrastructure Changes

πŸ”„ Migration to GroupeZ Maven Repository

Structura now publishes to the official GroupeZ Maven repository, replacing JitPack for more reliable and faster artifact distribution.

New Repository Configuration:

repositories {
    maven { 
        url = "https://repo.groupez.dev/releases"  // For stable releases
        // Use "snapshots" instead of "releases" for development versions
    }
}

dependencies {
    implementation("fr.traqueur:structura:<VERSION>")  // New coordinates
    implementation("org.yaml:snakeyaml:2.4")
}

Old Configuration (Deprecated):

repositories {
    maven { url = "https://jitpack.io" }  // ❌ No longer used
}

dependencies {
    implementation("com.github.Traqueur-dev:Structura:<VERSION>")  // ❌ Deprecated
}

βš™οΈ Build System Enhancements

GitHub Actions Integration

  • New CI/CD workflow: .github/workflows/build.yml
  • Automated builds: On push to main and develop branches
  • Pull request validation: Builds on PR events (opened, synchronized, reopened)
  • Manual triggers: Via workflow_dispatch
  • Automatic publishing: To GroupeZ Maven on successful builds

Workflow Features:

  • Concurrency control (cancels in-progress builds)
  • Reusable workflow from GroupeZ-dev/actions
  • Maven credential management
  • Discord notifications support (optional)

Gradle Configuration Improvements

  • Shadow JAR: Integrated for uber-jar generation
  • Target folder: Build outputs now go to target/ directory
  • SHA versioning: Support for Git commit-based versioning
  • Custom classifiers: Archive classifier support for variant builds
  • GroupeZ publish plugin: Simplified publishing with re.alwyn974.groupez.publish v1.0.0

Gradle Wrapper Update

  • Version: 8.10 β†’ 8.14
  • Latest features and bug fixes
  • Improved build performance

πŸ”§ Technical Details

ValueConverter Changes

// Added LocalDateTime formatter
private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ISO_LOCAL_DATE_TIME;

// New conversion logic
if (targetType == LocalDateTime.class) {
    return LocalDateTime.parse(value.toString(), DATE_TIME_FORMATTER);
}

Build Configuration

plugins {
    id("java-library")
    id("re.alwyn974.groupez.publish") version "1.0.0"  // New
    id("com.gradleup.shadow") version "9.0.0-beta11"   // New
}

group = "fr.traqueur"
version = property("version") as String

// SHA-based versioning support
rootProject.extra.properties["sha"]?.let { sha ->
    version = sha
}

// Shadow JAR configuration
tasks.shadowJar {
    archiveClassifier.set("")
    destinationDirectory.set(rootProject.extra["targetFolder"] as File)
}

tasks.build {
    dependsOn(tasks.shadowJar)
}

// Publish configuration
publishConfig {
    githubOwner = "Traqueur-dev"
    useRootProjectName = true
}

Settings Configuration

pluginManagement {
    repositories {
        maven {
            name = "groupezReleases"
            url = uri("https://repo.groupez.dev/releases")
        }
        gradlePluginPortal()
    }
}

πŸ§ͺ Testing

New Test: LocalDateTime Conversion

@Test
@DisplayName("Should handle LocalDateTime conversion from string")
void shouldHandleLocalDateTimeConversion() {
    var localDate = LocalDateTime.of(2023, 10, 5, 14, 30, 0);
    assertEquals(localDate, valueConverter.convert("2023-10-05T14:30:00", LocalDateTime.class, "test"));
}

πŸ“‹ Migration Guide

For Existing Users

Step 1: Update your repository configuration

Replace:

repositories {
    maven { url = "https://jitpack.io" }
}

With:

repositories {
    maven { url = "https://repo.groupez.dev/releases" }
}

Step 2: Update your dependency coordinates

Replace:

implementation("com.github.Traqueur-dev:Structura:<VERSION>")

With:

implementation("fr.traqueur:structura:<VERSION>")

Step 3: (Optional) Use LocalDateTime

If you need timestamp precision beyond date-only values:

// Before
public record Event(LocalDate timestamp) implements Loadable {}

// After
public record Event(LocalDateTime timestamp) implements Loadable {}
# Before
timestamp: 2023-10-05

# After
timestamp: 2023-10-05T14:30:00

πŸ“Š Comparison: Repository Hosting

Feature JitPack (Old) GroupeZ Maven (New)
Build Speed Slow (on-demand) Fast (pre-built)
Reliability Variable High
Cache Performance Poor Excellent
Custom Versioning Limited Full support
CI/CD Integration Manual Automated
Snapshot Support Basic Native

🎯 Benefits

For Users

  • βœ… Faster downloads: Pre-built artifacts with better CDN distribution
  • βœ… Better reliability: Dedicated infrastructure with guaranteed uptime
  • βœ… Snapshot support: Access to development versions via snapshots repository
  • βœ… Enhanced DateTime: More precise temporal data with LocalDateTime

For Contributors

  • βœ… Automated publishing: No manual release process
  • βœ… Better testing: Integrated CI/CD with PR validation
  • βœ… Version management: Git SHA-based versioning for development builds
  • βœ… Simplified workflows: Reusable GitHub Actions

⚠️ Breaking Changes

Repository Migration

  • Old URL: https://jitpack.io β†’ No longer maintained
  • Old coordinates: com.github.Traqueur-dev:Structura β†’ Deprecated
  • New URL: https://repo.groupez.dev/releases
  • New coordinates: fr.traqueur:structura

Note: Version 1.6.0 is the first version available on GroupeZ Maven. Previous versions remain on JitPack but won't receive updates.


πŸ“ Version

1.5.0 β†’ 1.6.0

Changes:

  • ✨ Added LocalDateTime support with ISO-8601 parsing
  • πŸ—οΈ Migrated to GroupeZ Maven repository
  • πŸ”„ Updated dependency coordinates (fr.traqueur:structura)
  • βš™οΈ Added GitHub Actions CI/CD workflow
  • πŸ“¦ Integrated Shadow plugin for uber-JAR generation
  • πŸ”§ Gradle 8.10 β†’ 8.14
  • πŸ”§ Added GroupeZ publish plugin
  • πŸ“‚ Build outputs now go to target/ directory
  • πŸ§ͺ New test for LocalDateTime conversion
  • πŸ“– Updated README with new repository URLs

Full Changelog: 1.5.0...1.6.0


πŸš€ Getting Started

Quick Start with v1.6.0

build.gradle.kts:

repositories {
    mavenCentral()
    maven { url = uri("https://repo.groupez.dev/releases") }
}

dependencies {
    implementation("fr.traqueur:structura:1.6.0")
    implementation("org.yaml:snakeyaml:2.4")
}

Example Usage:

public record ScheduledTask(
    String name,
    LocalDateTime scheduledAt,
    LocalDate deadline
) implements Loadable {}
tasks:
  - name: "Database Backup"
    scheduled-at: 2025-03-15T02:00:00
    deadline: 2025-03-15
  - name: "Report Generation"
    scheduled-at: 2025-03-20T09:30:00
    deadline: 2025-03-21

πŸ“ž Support