Skip to content

Commit

Permalink
#4 moving project struct
Browse files Browse the repository at this point in the history
  • Loading branch information
hlafaille committed Mar 14, 2024
1 parent 3bf9c26 commit 0ec6599
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion src/backend/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
use serde::{Deserialize, Serialize};

pub mod context;
pub mod project;
pub mod toolchain;
pub mod lock;
pub mod dependency;
pub mod dependency;

/// Represents an `espresso.toml` file
#[derive(Deserialize, Serialize, Debug)]
pub struct Config {
pub project: Project,
pub toolchain: Toolchain,
// pub dependencies_maven: std::collections::HashMap<String, String>,
/// Dependencies located on your filesystem
pub dependencies_fs: std::collections::HashMap<String, String>,
}

/// Represents information about the currently loaded Project
#[derive(Deserialize, Serialize, Debug)]
pub struct Project {
/// Name of the project (ex: `My Espresso Project`)
pub name: String,
/// Version of the project (ex: `1.0.0`)
pub version: String,
/// Java base package in dot notation (ex: `com.me.project`)
pub base_package: String,
}

/// Represents toolchain information
#[derive(Deserialize, Serialize, Debug)]
pub struct Toolchain {
/// Path to the JDK toolchain (ex: `${JAVA_HOME}`)
pub path: String,
}

0 comments on commit 0ec6599

Please sign in to comment.