majkrzak / kot

Minimalistinc tool for building kotlin projects
MIT License
0 stars 1 forks source link

Add commandline arguments parsing #1

Open majkrzak opened 4 years ago

majkrzak commented 4 years ago

Currently dependencies resolving and idea project generation are handled automatically when module is invoked. Add argv parsing and trigger revelant actions according to it. Keep in mind that more actions will be implemented.

TJBANEY commented 4 years ago

@majkrzak I'd like to take this one on if you don't mind 🙂

majkrzak commented 4 years ago

@TJBANEY sure, I see it somehouw like: python -m kot --structure=structure.json init --idea python -m kot --structure=structure.json build --fat --out=project.jar The build backend part will be handled in #2

TJBANEY commented 4 years ago

Thanks @majkrzak. I'll come back to you here if I have any questions during development.

majkrzak commented 4 years ago

Be careful, there might be some quirks cause I've scratched this project today to replace gradle in other one :sweat_smile:

TJBANEY commented 4 years ago

I'll be sure to brace for quirks heh 😛 What was your reasoning for leaving gradle?

majkrzak commented 4 years ago

To many "magic" dependencies. Lack of possibility to remove main source set, without breaking everything. Plenty of autogeneratoed garbage tasks.

TJBANEY commented 4 years ago

@majkrzak Hey there. Do you have an example configuration JSON file to use for the structure argument when running the script? The JSON with keys: name, dependencies, and modules.

majkrzak commented 4 years ago

Yes, it is going around some in some other issues


{
  "name": "my_project",
  "dependencies": [
    "org.jetbrains.kotlin:kotlin-stdlib:1.3.50",
    "org.jetbrains.kotlin:kotlin-reflect:1.3.50",
    "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2",
    "org.koin:koin-core:2.0.1"
  ],
  "modules": {
    "simple":[],
    "complex": [
        "simple"
    ]
  }
}```