Skip to content

Commit

Permalink
chore: general build cleanup, remove ssg pkg from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
sgammon committed Jul 26, 2023
1 parent b26ee0c commit f917a65
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 126 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ else
SIGNING_ON = false
endif

OMIT_NATIVE ?= -x nativeCompile -x testNativeImage
OMIT_NATIVE ?= -x nativeCompile

ifneq ($(NATIVE),)
ifneq ($(NATIVE),no)
Expand Down
47 changes: 1 addition & 46 deletions gradle-ci.properties
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
# # Settings: Build
elide.ci = true
buildSamples = false
buildPlugins = false
enableSigning = false
elide.buildMode = dev
elide.pluginVersion = 1.0.0-beta21
elide.pluginMode = repository
elide.lockDeps = false
elide.stamp = false
elide.graalvm.variant = COMMUNITY
elide.vm.inspect = false
publishMainHostLock = false

elide.publish.repo.maven = gcs://elide-snapshots/repository/v3
elide.publish.repo.docker.tools = us-docker.pkg.dev/elide-fw/tools
elide.publish.repo.docker.samples = us-docker.pkg.dev/elide-fw/samples

org.gradle.java.installations.fromEnv = JAVA_HOME,GRAALVM_HOME
org.gradle.java.installations.paths = /usr/lib/jvm/zulu11,/usr/lib/gvm

elide.samples.docker.base.native = us-docker.pkg.\
dev/elide-fw/tools/runtime/native:latest

# # Settings: Gradle
org.gradle.parallel = true
org.gradle.caching = true
org.gradle.configureondemand = true
org.gradle.jvmargs = -Xmx4096m -XX:MaxMetaspaceSize=1024m

# # Settings: Languages
versions.java.language = 11
versions.ecma.language = v5
versions.kotlin.sdk = 1.9.0
versions.kotlin.language = 1.9

# # Settings: Kotlin
kotlin.code.style = official
kotlin.js.compiler = both
kotlin.js.generate.executable.default = false
kotlin.parallel.tasks.in.project = true
kotlin.build.report.output = build_scan
kotlin.incremental = true
kotlin.incremental.useClasspathSnapshot = true
kotlin.mpp.stability.nowarn = true
kotlin.mpp.enableCInteropCommonization = true
# empty.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ embeddedCompose = false
elide.buildMode = dev
elie.release = false
elide.strict = false
elide.pluginVersion = 1.0.0-beta21
elide.pluginVersion = 1.0.0-beta22
elide.pluginMode = repository
elide.stamp = false
elide.atomicFu = false
Expand Down
6 changes: 3 additions & 3 deletions gradle/elide.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
elide = "1.0-v3-alpha3-b7"
elide_plugin = "1.0.0-beta21"
elide_plugin = "1.0.0-beta22"
kotlin_sdk = "1.9.0"
kotlin_language = "1.9"
jna = "5.8.0"
ksp = "1.9.0-1.0.12"
koin = "3.4.2"
koin_ksp = "1.2.2"
graalvm = "23.0.0"
graalvm = "23.0.1"
graalvm_sdk = "23.0.1"
graalvm_metadata = "0.2.5"
graalvm_plugin = "0.9.23"
Expand Down Expand Up @@ -617,7 +617,7 @@ plugin_openrewrite = { group = "org.openrewrite", name = "plugin", version.ref =
elide_base = { group = "dev.elide", name = "elide-base", version.ref = "elide" }
elide_core = { group = "dev.elide", name = "elide-core", version.ref = "elide" }
elide_test = { group = "dev.elide", name = "elide-test", version.ref = "elide" }
elide_ssg = { group = "dev.elide", name = "ssg", version.ref = "elide" }
#elide_ssg = { group = "dev.elide", name = "ssg", version.ref = "elide" }
elide_proto = { group = "dev.elide", name = "proto-core", version.ref = "elide" }
elide_proto_protobuf = { group = "dev.elide", name = "proto-protobuf", version.ref = "elide" }
elide_proto_flatbuffers = { group = "dev.elide", name = "proto-flatbuffers", version.ref = "elide" }
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ val quickbuild = (
project.properties["elide.buildMode"] == "dev"
)

afterEvaluate {
tasks.named("testNativeImage") {
enabled = false
}
}


/**
* Build: CLI Native Image
*/
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/main/resources/elide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jackson:

## Performance
netty.default.allocator.max-order: 3
netty.default.allocator.use-cache-for-all-threads: true
netty.resource-leak-detector-level: DISABLED
micronaut.server.netty.server-type: STREAMED
micronaut.server.netty.use-native-transport: true
micronaut.server.netty.parent.prefer-native-transport: true
micronaut.server.netty.worker.prefer-native-transport: true
Expand Down
6 changes: 0 additions & 6 deletions packages/ssg/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,6 @@ val quickbuild = (
project.properties["elide.buildMode"] == "dev"
)

afterEvaluate {
tasks.named("testNativeImage") {
enabled = false
}
}

graalvmNative {
testSupport.set(false) // disabled for now due to micronaut test bugs in native

Expand Down
7 changes: 0 additions & 7 deletions tools/bundler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,6 @@ val quickbuild = (
project.properties["elide.buildMode"] == "dev"
)

afterEvaluate {
tasks.named("testNativeImage") {
enabled = false
}
}


/**
* Build: Bundler Native Image
*/
Expand Down
2 changes: 1 addition & 1 deletion tools/conventions/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ object Versions {
const val grpc = "1.51.0"

/** GraalVM version. */
const val graalvm = "22.3.0"
const val graalvm = "23.0.1"
}
2 changes: 1 addition & 1 deletion tools/plugin/gradle-plugin/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ google_auto_service_annotations = { group = "com.google.auto.service", name = "a

elide_core = { group = "dev.elide", name = "elide-core", version.ref = "elide" }
elide_base = { group = "dev.elide", name = "elide-base", version.ref = "elide" }
elide_ssg = { group = "dev.elide", name = "ssg", version.ref = "elide" }
#elide_ssg = { group = "dev.elide", name = "ssg", version.ref = "elide" }
elide_server = { group = "dev.elide", name = "server", version.ref = "elide" }
elide_proto_core = { group = "dev.elide", name = "elide-proto-core", version.ref = "elide" }
elide_proto_legacy = { group = "dev.elide", name = "proto", version = "1.0-v3-alpha1-rc38" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ dependencies {
api(kotlin("gradle-plugin"))
api(libs.elide.tools.processor)
implementation(libs.elide.base)
implementation(libs.elide.ssg)
// implementation(libs.elide.ssg)
implementation(libs.elide.proto.core)
implementation(libs.elide.proto.protobuf)

Expand Down Expand Up @@ -210,7 +210,7 @@ dependencies {

// Elide: Embedded Libs
embedded(libs.elide.base)
embedded(libs.elide.ssg)
// embedded(libs.elide.ssg)

// Elide: Embedded Tools
embedded(libs.closure.templates)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicReference
import javax.inject.Inject
import elide.tool.ssg.SiteCompilerParams.Options as CompilerOptions
//import elide.tool.ssg.SiteCompilerParams.Options as CompilerOptions

/** Elide JVM server target settings. */
@Suppress("MemberVisibilityCanBePrivate", "unused")
Expand All @@ -30,7 +30,7 @@ public open class ElideServerHandler @Inject constructor(objects: ObjectFactory)
public val ssr: ServerSSRHandler = objects.newInstance(ServerSSRHandler::class.java)

/** Static site generator (SSG) configuration. */
public val ssg: StaticSiteHandler = objects.newInstance(StaticSiteHandler::class.java)
// public val ssg: StaticSiteHandler = objects.newInstance(StaticSiteHandler::class.java)

/** Server SSR runtime configuration. */
public val ssrRuntime: AtomicReference<EmbeddedScriptLanguage> = AtomicReference(defaultScriptLanguage)
Expand All @@ -42,7 +42,8 @@ public open class ElideServerHandler @Inject constructor(objects: ObjectFactory)

/** @return True if the user has configured an SSG target from their build script. */
public fun hasSsgConfig(): Boolean {
return ssg.enabled.get()
return false
// return ssg.enabled.get()
}

/** @return Whether the user has configured assets */
Expand All @@ -51,10 +52,10 @@ public open class ElideServerHandler @Inject constructor(objects: ObjectFactory)
}

/** Configure SSG compilation pass. */
public fun ssg(action: Action<StaticSiteHandler>) {
ssg.enabled.set(true)
action.execute(ssg)
}
// public fun ssg(action: Action<StaticSiteHandler>) {
// ssg.enabled.set(true)
// action.execute(ssg)
// }

/** Configure server-embedded assets. */
public fun assets(action: Action<ElideAssetsHandler>) {
Expand Down Expand Up @@ -95,48 +96,48 @@ public open class ElideServerHandler @Inject constructor(objects: ObjectFactory)
}

/** Configures SSG (static site generator) features for Elide server targets. */
public open class StaticSiteHandler {
/** Whether the user configured a static site target in their build script. */
internal val enabled: AtomicBoolean = AtomicBoolean(false)

/** Explicit manifest path; if not provided, one will be calculated/resolved. */
internal val manifest: AtomicReference<String?> = AtomicReference(null)

/** Explicit output path; if not provided, one will be calculated. */
internal val output: AtomicReference<String?> = AtomicReference(null)

/** Explicit target app path; if not provided, one will be calculated. */
internal val target: AtomicReference<String?> = AtomicReference(null)

/** Whether to run the SSG site task in verbose mode. */
internal val verbose: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.verbose)

/** Whether to run the SSG site task in debug mode. */
internal val debug: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.debug)

/** Whether to allow colorized/dynamic output. */
internal val pretty: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.pretty)

/** Whether to crawl for additional assets. */
internal val crawl: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.crawl)

/** Response timeout to apply when operating in HTTP mode. */
internal val timeout: AtomicInteger = AtomicInteger(CompilerOptions.DEFAULT_REQUEST_TIMEOUT)

/** Response timeout to apply when operating in HTTP mode. */
internal val extraOrigins: SortedSet<String> = ConcurrentSkipListSet()

/** Whether to ignore cert errors when operating in HTTP mode. */
internal val ignoreCertErrors: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.ignoreCertErrors)

/** Enable a static site build run for a given server target. */
public fun enable() {
enabled.set(true)
}

/** Disable a static site build run for a given server target. */
public fun disable() {
enabled.set(false)
}
}
// public open class StaticSiteHandler {
// /** Whether the user configured a static site target in their build script. */
// internal val enabled: AtomicBoolean = AtomicBoolean(false)
//
// /** Explicit manifest path; if not provided, one will be calculated/resolved. */
// internal val manifest: AtomicReference<String?> = AtomicReference(null)
//
// /** Explicit output path; if not provided, one will be calculated. */
// internal val output: AtomicReference<String?> = AtomicReference(null)
//
// /** Explicit target app path; if not provided, one will be calculated. */
// internal val target: AtomicReference<String?> = AtomicReference(null)
//
// /** Whether to run the SSG site task in verbose mode. */
// internal val verbose: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.verbose)
//
// /** Whether to run the SSG site task in debug mode. */
// internal val debug: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.debug)
//
// /** Whether to allow colorized/dynamic output. */
// internal val pretty: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.pretty)
//
// /** Whether to crawl for additional assets. */
// internal val crawl: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.crawl)
//
// /** Response timeout to apply when operating in HTTP mode. */
// internal val timeout: AtomicInteger = AtomicInteger(CompilerOptions.DEFAULT_REQUEST_TIMEOUT)
//
// /** Response timeout to apply when operating in HTTP mode. */
// internal val extraOrigins: SortedSet<String> = ConcurrentSkipListSet()
//
// /** Whether to ignore cert errors when operating in HTTP mode. */
// internal val ignoreCertErrors: AtomicBoolean = AtomicBoolean(CompilerOptions.DEFAULTS.ignoreCertErrors)
//
// /** Enable a static site build run for a given server target. */
// public fun enable() {
// enabled.set(true)
// }
//
// /** Disable a static site build run for a given server target. */
// public fun disable() {
// enabled.set(false)
// }
// }
}

0 comments on commit f917a65

Please sign in to comment.