Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5de74f4
Adds interface JsonReaderParser, with utility methods for streaming p…
joaobispo May 6, 2025
802110f
Adds JsonReaderParser.nextValue(), which generically parses the next …
joaobispo May 16, 2025
f7cdc5c
Adds methods to JsonReaderParser
joaobispo May 17, 2025
89efbef
[GsonPlus] Experiment related to parsing malformed JSON
joaobispo May 31, 2025
4f2c2ef
[GsonPlus] Removes code related to handling malformed JSON
joaobispo May 31, 2025
9394cda
Refactor project structure and migrate to Gradle build system
lm-sousa Jun 15, 2025
aefd582
Mark repeat method as deprecated and suggest using String#repeat(int)…
lm-sousa Jun 15, 2025
32b6266
Refactor Pair usage to utilize record syntax and update method calls …
lm-sousa Jun 15, 2025
313b0ce
Remove unused imports and suppress warnings in various classes for cl…
lm-sousa Jun 15, 2025
29e15b0
Small repo cleanup
lm-sousa Jul 2, 2025
8a1ce90
Add Copilot instructions for repository overview, setup, and guidelines
lm-sousa Jul 2, 2025
ea81a02
Update nightly workflow to include additional Gradle projects for bui…
lm-sousa Jul 2, 2025
51bada2
Add missing repositories block to build.gradle for dependency resolution
lm-sousa Jul 2, 2025
5f16458
Partially revert 5f8f401
lm-sousa Jul 2, 2025
5045d12
Remove EclipseUtils from nightly build and add commons-lang3 dependen…
lm-sousa Jul 2, 2025
5cf5cf2
Fix path to Z3 library in build.gradle
lm-sousa Jul 2, 2025
d8c1cd9
Update copilot instructions: clarify Java version requirement and add…
lm-sousa Jul 2, 2025
625a3ca
Refactor SpecsUtils tests to use JUnit 5. Added new tests. Fixed some…
lm-sousa Jul 11, 2025
e9ec959
[SpecsUtils] Adds ConsumerClassMap
joaobispo Jul 15, 2025
5ff4304
Cleanup deprecated code usages.
lm-sousa Jul 21, 2025
a208db6
[CommonLangPlus] Add unit tests
lm-sousa Jul 21, 2025
033c671
[GitPlus] Add unit tests (partial testing)
lm-sousa Jul 21, 2025
72fa78a
[JacksonPlus] Add unit tests
lm-sousa Jul 21, 2025
776d0e4
[JadxPlus] Add unit tests
lm-sousa Jul 21, 2025
16d95d1
[SymjaPlus] Add unit tests and fix discovered bugs
lm-sousa Jul 21, 2025
8cfa61b
[tdrcLibrary] Add unit tests and fix discovered bugs
lm-sousa Jul 21, 2025
d63f554
[JavaGenerator] Add unit tests and fix discovered bugs
lm-sousa Jul 22, 2025
55bf31b
[jOptions] Modernized and enabled the execution of existing tests
lm-sousa Jul 23, 2025
45c265d
[jOptions] Small changes to legacy tests to avoid conflicts with new …
lm-sousa Jul 25, 2025
3b4f39b
[SpecsUtils] Adds SpecsSystem.getWindowsPowershell()
joaobispo Aug 8, 2025
0fd8161
Merge branch 'master' into lara-dsl-deprecation
lm-sousa Aug 16, 2025
e124a1b
[SpecsUtils] Fix typos and improve documentation for PowerShell methods
lm-sousa Aug 16, 2025
468ebd4
Remove obsolete ant-based workflow
lm-sousa Aug 17, 2025
9d2bd2f
Refactor: Replace SpecsFactory methods with standard Java collections
lm-sousa Aug 17, 2025
85064ca
Update Copilot instructions: Enhance repository overview, build instr…
lm-sousa Aug 17, 2025
b64f4e7
Refactor: Improve code formatting and remove unused constants in vari…
lm-sousa Aug 21, 2025
2255cdc
[XStreamPlus] Add unit tests and fix discovered bugs
lm-sousa Aug 21, 2025
88803be
[jOptions] Add unit tests and fix discovered bugs
lm-sousa Aug 25, 2025
42f3956
Fix cache behavior in PropertyWithNodeManager to ensure consistent re…
lm-sousa Aug 26, 2025
6d28f02
Refactor: Replace SpecsFactory.getUnmodifiableList with List.copyOf f…
lm-sousa Aug 26, 2025
f4d9639
[SpecsUtils] Add unit tests and fix *some* discovered bugs
lm-sousa Aug 27, 2025
e3132fe
Add JUnit Pioneer for test retries and apply to performance tests
lm-sousa Aug 27, 2025
82aa246
Add Testing plans and discovered bugs (for documentation purposes)
lm-sousa Aug 29, 2025
51293d9
[jOptions] Remove documentation for solved bugs
lm-sousa Aug 29, 2025
27c502c
[SpecsUtils] Fixed the bugs reported in BUGS_5.1.md
lm-sousa Aug 29, 2025
c5541fd
[SpecsUtils] Fixed the bugs reported in BUGS_5.3.md
lm-sousa Aug 29, 2025
40eb5ee
[SpecsUtils] Fixed the bugs reported in BUGS_5.4.md
lm-sousa Aug 29, 2025
a1575c4
[SpecsUtils] Fixed the bugs reported in BUGS_5.5.md
lm-sousa Aug 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
172 changes: 172 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# SPeCS Java Libraries - Copilot Instructions

## Repository Overview

This repository contains 24 Java libraries developed by the SPeCS research group, organized as independent Gradle projects. Each library extends or enhances existing Java libraries (indicated by the "-Plus" suffix) or provides custom utilities. The repository uses Java 17, Gradle for builds, and follows a multi-project structure without a root Gradle configuration.

**Repository Statistics:**
- 24 main Java libraries + 3 legacy projects (RuntimeMutators, SpecsHWUtils, SupportJavaLibs)
- ~200K+ lines of Java code across all projects
- Mixed testing frameworks: JUnit 5 (modern projects) and JUnit 4 (legacy projects)
- Inter-project dependencies centered around SpecsUtils as the core utility library

## Build Instructions

### Prerequisites
- **Java 17 or higher** (REQUIRED - all projects target Java 17)
- **Gradle 8.13+** (system Gradle installation - NO gradlew wrapper in repo)

### Building Individual Projects

**ALWAYS navigate to the specific project directory before running Gradle commands.** Each project is self-contained with its own `build.gradle` and `settings.gradle`.

```bash
cd <project-name>
gradle build # Compile, test, package, and validate coverage (includes tests)
gradle test # Run tests only (without packaging)
gradle jar # Create JAR file
gradle clean # Clean build artifacts
```

### Build Dependencies Order

Due to inter-project dependencies, build in this order when building multiple projects:

1. **Core Libraries (no dependencies):**
- CommonsLangPlus, CommonsCompressPlus, GsonPlus, XStreamPlus

2. **SpecsUtils** (most projects depend on this)

3. **All other projects** (depend on SpecsUtils and/or other core libraries)

### Key Build Considerations

- **SpecsUtils tests are slow** - can take several minutes to complete
- **`gradle build` includes tests** - build will fail if tests fail or coverage is insufficient
- Projects use **different testing frameworks**:
- Modern projects: JUnit 5 with Mockito, AssertJ + Jacoco coverage validation
- Legacy projects: JUnit 4
- **Coverage requirements**: Modern projects with Jacoco enforce 80% minimum test coverage
- **No parallel builds** - run projects sequentially to avoid dependency conflicts
- **Inter-project dependencies** use syntax like `implementation ':SpecsUtils'`

### Common Build Issues & Solutions

1. **Dependency not found errors**: Ensure dependent projects are built first (e.g., build SpecsUtils before projects that depend on it)
2. **Java version errors**: Verify Java 17+ is active (`java -version`)
3. **Test timeouts**: SpecsUtils tests can take 5+ minutes - be patient
4. **Coverage failures**: Modern projects require 80% test coverage - add tests if build fails due to insufficient coverage
5. **Memory issues**: For large projects, use `gradle build -Xmx2g` if needed

## Project Layout

### Root Structure
```
├── .github/workflows/nightly.yml # CI pipeline
├── README.md # Project documentation
├── LICENSE # Apache 2.0 license
├── .gitignore # Ignores build/, .gradle/, etc.
└── [24 Java library directories]/
```

### Individual Project Structure
```
ProjectName/
├── build.gradle # Gradle build configuration
├── settings.gradle # Project settings
├── src/ # Main source code
├── test/ # Unit tests (JUnit 4 or 5)
├── resources/ # Resources (optional)
├── bin/ # Eclipse-generated (ignore)
└── build/ # Generated build artifacts
```

### Key Libraries and Their Purpose

**Core Infrastructure:**
- **SpecsUtils** - Core utilities, most other projects depend on this
- **CommonsLangPlus** - Extended Apache Commons Lang utilities
- **jOptions** - Command-line options and configuration management

**External Integrations:**
- **GitPlus** - Git operations and utilities
- **GitlabPlus** - GitLab API integration
- **SlackPlus** - Slack API integration
- **JsEngine** - JavaScript execution via GraalVM

**Data Processing:**
- **GsonPlus** - Extended JSON processing with Google Gson
- **JacksonPlus** - Extended JSON processing with Jackson
- **XStreamPlus** - Extended XML processing

**Development Tools:**
- **JavaGenerator** - Java code generation utilities
- **EclipseUtils** - Eclipse IDE integration tools
- **AntTasks** - Custom Ant build tasks

### Legacy Projects (No Gradle builds)
- **RuntimeMutators** - Runtime code mutation (Eclipse project only)
- **SpecsHWUtils** - Hardware utilities (Eclipse project only)
- **SupportJavaLibs** - Supporting libraries and tools

## Continuous Integration

### GitHub Actions Workflow
File: `.github/workflows/nightly.yml`

**Triggers:** Push to any branch, manual workflow dispatch
**Environment:** Ubuntu latest, Java 17 (Temurin), Gradle current

**Build Process:**
1. Sequentially builds and tests all 24 Gradle projects
2. Uses `gradle build test` for each project
3. Fails if any project fails to build or test
4. Publishes JUnit test reports
5. Generates dependency graphs

### Tested Projects (in CI order):
AntTasks, AsmParser, CommonsCompressPlus, CommonsLangPlus, GearmanPlus, GitlabPlus, GitPlus, Gprofer, GsonPlus, GuiHelper, JacksonPlus, JadxPlus, JavaGenerator, jOptions, JsEngine, LogbackPlus, MvelPlus, SlackPlus, SpecsUtils, SymjaPlus, tdrcLibrary, XStreamPlus, Z3Helper

### Local Validation Steps
1. **Build specific project**: `cd ProjectName && gradle build`
2. **Run tests**: `cd ProjectName && gradle test`
3. **Check code coverage** (for projects with Jacoco): `gradle jacocoTestReport`
4. **Validate dependencies**: Ensure dependent projects build successfully

## Development Guidelines

### Code Style & Conventions
- Java 17 language features are preferred
- Follow existing patterns within each project
- Add tests for new functionality (JUnit 5 for new code)
- Use appropriate testing framework for the project (check existing tests)

### Testing Approach
- **Modern projects**: JUnit 5 + Mockito + AssertJ with Jacoco coverage enforcement (80% minimum)
- **Legacy projects**: JUnit 4
- **Coverage validation**: Jacoco runs automatically with tests and enforces minimum coverage thresholds
- **Test locations**: Tests in `test/` directory, following package structure

### Making Changes
1. Identify the correct project for your changes
2. Check project's testing framework and conventions
3. Build the project first: `cd ProjectName && gradle build`
4. Make changes following existing patterns
5. Add/update tests appropriately
6. Re-run `gradle build` to ensure everything works
7. For projects with dependencies, test dependent projects as well

### Key Files to Check
- `build.gradle` - Dependencies, Java version, testing framework
- `src/` - Main source code structure and patterns
- `test/` - Testing approach and existing test structure
- `README.md` (if present) - Project-specific documentation

## Trust These Instructions

These instructions are comprehensive and validated. Only search for additional information if:
1. A specific command fails with an unexpected error
2. You encounter a build configuration not covered here
3. Project-specific documentation contradicts these general guidelines

Always check the project's individual `build.gradle` for dependencies and testing setup before making changes.
62 changes: 0 additions & 62 deletions .github/workflows/ant-main.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ jobs:
- name: Build and test all Gradle projects sequentially
run: |
projects=(
AntTasks
AsmParser
CommonsCompressPlus
CommonsLangPlus
GearmanPlus
GitlabPlus
GitPlus
Gprofer
GsonPlus
Expand All @@ -51,10 +53,13 @@ jobs:
jOptions
JsEngine
LogbackPlus
MvelPlus
SlackPlus
SpecsUtils
SymjaPlus
tdrcLibrary
XStreamPlus
Z3Helper
)
failed=()
for project in "${projects[@]}"; do
Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"jest.runMode": {
"type": "on-demand"
},
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic"
}
11 changes: 0 additions & 11 deletions AntTasks/.classpath

This file was deleted.

29 changes: 0 additions & 29 deletions AntTasks/.project

This file was deleted.

51 changes: 51 additions & 0 deletions AntTasks/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
plugins {
id 'distribution'
id 'java'
}

java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

// Repositories providers
repositories {
mavenCentral()
}

dependencies {
testImplementation "junit:junit:4.13.1"

implementation ':jOptions'
implementation ':SpecsUtils'

// Ivy dependencies
implementation group: 'org.apache.ant', name: 'ant', version: '1.9.1'
implementation group: 'org.apache.ivy', name: 'ivy', version: '2.5.0-rc1'
implementation group: 'org.apache.ant', name: 'ant-jsch', version: '1.10.5'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
implementation group: 'com.io7m.xom', name: 'xom', version: '1.2.10'
}

// Project sources
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'resources'
}
}

test {
java {
srcDir 'test'
}
resources {
srcDir 'resources'
}
}
}
Loading
Loading