elixir is kil

This commit is contained in:
mae 2025-10-08 23:16:14 -05:00
parent e58cc0a1a6
commit ec73bdabfa
Signed by: maemachinebroke
GPG Key ID: B54591A4805E9CC8
13 changed files with 28 additions and 114 deletions

View File

@ -23,13 +23,13 @@ tasks.build.configure {
dependsOn(":plt-build-wrapper:compileGo") dependsOn(":plt-build-wrapper:compileGo")
dependsOn(":plt-fetch:compileGo") dependsOn(":plt-fetch:compileGo")
dependsOn(":plt-pkg:compileGo") dependsOn(":plt-pkg:compileGo")
dependsOn(":plt-server:compileEx") dependsOn(":plt-server:compileGo")
dependsOn(":plt-updated:compileGo") dependsOn(":plt-updated:compileGo")
} }
tasks.test.configure { tasks.test.configure {
dependsOn(":plt-build-wrapper:testGo") dependsOn(":plt-build-wrapper:testGo")
dependsOn(":plt-fetch:testGo") dependsOn(":plt-fetch:testGo")
dependsOn(":plt-pkg:testGo") dependsOn(":plt-pkg:testGo")
dependsOn(":plt-server:testEx") dependsOn(":plt-server:testGo")
dependsOn(":plt-updated:testGo") dependsOn(":plt-updated:testGo")
} }

View File

@ -4,6 +4,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.tasks.Exec import org.gradle.api.tasks.Exec
@Suppress("unused") // FIXME(mae) i have literally no clue why idea thinks GoPlugin is unused
class GoPlugin : Plugin<Project> { class GoPlugin : Plugin<Project> {
override fun apply(project: Project) { override fun apply(project: Project) {
project.tasks.register("compileGo", Exec::class.java) { project.tasks.register("compileGo", Exec::class.java) {
@ -12,6 +13,12 @@ class GoPlugin : Plugin<Project> {
workingDir(project.layout.projectDirectory) workingDir(project.layout.projectDirectory)
commandLine("go", "build", "-o", "../build/go") commandLine("go", "build", "-o", "../build/go")
} }
project.tasks.register("runGo", Exec::class.java) {
group = "go"
description = "run go application"
workingDir(project.layout.projectDirectory)
commandLine("go", "run", "main.go")
}
project.tasks.register("testGo", Exec::class.java) { project.tasks.register("testGo", Exec::class.java) {
group = "go" group = "go"
description = "run go test" description = "run go test"

View File

@ -1,4 +0,0 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]

23
plt-server/.gitignore vendored
View File

@ -1,23 +0,0 @@
# The directory Mix will write compiled artifacts to.
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where third-party dependencies like ExDoc output generated docs.
/doc/
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
# Also ignore archive artifacts (built via "mix archive.build").
*.ez
# Ignore package tarball (built via "mix hex.build").
plt_server-*.tar
# Temporary files, for example, from tests.
/tmp/

View File

@ -1,21 +0,0 @@
# PltServer
**TODO: Add description**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `plt_server` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:plt_server, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/plt_server>.

View File

@ -1,10 +1,3 @@
tasks.register("compileEx", Exec::class) { plugins {
group = "elixir" id("goPlugin")
workingDir(project.layout.projectDirectory)
commandLine("mix", "compile") //TODO
}
tasks.register("testEx", Exec::class) {
group = "elixir"
workingDir(project.layout.projectDirectory)
commandLine("mix", "test")
} }

3
plt-server/go.mod Normal file
View File

@ -0,0 +1,3 @@
module plt-updated
go 1.24

View File

@ -1,18 +0,0 @@
defmodule PltServer do
@moduledoc """
Documentation for `PltServer`.
"""
@doc """
Hello world.
## Examples
iex> PltServer.hello()
:world
"""
def hello do
:world
end
end

5
plt-server/main.go Normal file
View File

@ -0,0 +1,5 @@
package main
func main() {
}

9
plt-server/main_test.go Normal file
View File

@ -0,0 +1,9 @@
package main
import (
"testing"
)
func TestHelloWorld(t *testing.T) {
}

View File

@ -1,28 +0,0 @@
defmodule PltServer.MixProject do
use Mix.Project
def project do
[
app: :plt_server,
version: "0.1.0",
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
]
end
end

View File

@ -1,8 +0,0 @@
defmodule PltServerTest do
use ExUnit.Case
doctest PltServer
test "greets the world" do
assert PltServer.hello() == :world
end
end

View File

@ -1 +0,0 @@
ExUnit.start()