Skip to content

Commit

Permalink
Add Querent Plugin to Ceres
Browse files Browse the repository at this point in the history
  • Loading branch information
teogor committed Nov 2, 2023
1 parent cc871b8 commit c43cc33
Show file tree
Hide file tree
Showing 60 changed files with 7,722 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish-querent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Querent

on:
workflow_dispatch:

jobs:
publish:
name: Snapshot build and publish
runs-on: ubuntu-latest
environment: PRODUCTION
timeout-minutes: 120
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
SONATYPE_CONNECT_TIMEOUT_SECONDS: 120
SONATYPE_CLOSE_TIMEOUT_SECONDS: 1800

steps:
- name: Check out code
uses: actions/[email protected]

- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17

- name: Grant Permission to Execute Gradle
run: chmod +x gradlew

- name: Publish to MavenCentral
run: |
./gradlew :querent:publishQuerentLibrariesToMavenCentral --no-configuration-cache
1 change: 1 addition & 0 deletions querent/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
39 changes: 39 additions & 0 deletions querent/api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

dependencies {
api(project(":querent:languages-schema-api"))
api(libs.androidx.annotation)
api(libs.android.gradlePlugin)
api(libs.kotlin.gradlePlugin)
api(libs.kotlin.poet)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dev.teogor.querent.api

interface BuildFeatures {

/**
* Flag to enable/disable the creation of build profiles.
*
* A build profile is a set of configurations that define how a
* project is built. Enabling this option allows customizing the
* build process for specific scenarios or purposes.
*
* The default value is set to `false`, indicating that build profiles
* are not created. When set to `true`, build profiles are generated
* based on the applied configurations.
*
* For more details on build profiles, refer to:
* [https://source.teogor.dev/ceres].
*/
var buildProfile: Boolean

/**
* A flag that enables/disables the utilization of XML resources within
* the build process.
*
* Setting the `xmlResources` property to `true` allows the integration
* and use of XML resources in the build process. XML resources refer to
* structured data files in XML format used for various definitions and
* configurations.
*
* The default value for this property is `false`, implying that XML resources
* are not utilized. Enabling this flag enables access to and utilization of
* XML-based content within the build process.
*
* For further information about the handling and integration of XML resources,
* see the documentation at [https://source.teogor.dev/ceres].
*/
var xmlResources: Boolean

/**
* A flag that indicates whether the build process supports the definition
* and management of language schemas.
*
* The `languagesSchema` property, when set to `true`, enables the configuration
* and management of language schemas or structures for the project's build
* process. Language schemas encompass the definition of language-related data,
* rules, or structures for use within the project's build. Enabling this flag
* allows developers to define, configure, or manage language-specific data
* structures or formats for use within the build process.
*
* By default, the `languagesSchema` property is set to `false`, indicating that
* language schemas are not actively managed or utilized in the build process.
* Setting this property to `true` allows he incorporation of language-specific
* structures into the build process.
*
* For additional details on configuring language schemas and their integration
* within the build process, please refer to the documentation at
* [https://source.teogor.dev/ceres].
*/
var languagesSchema: Boolean
}
19 changes: 19 additions & 0 deletions querent/api/src/main/kotlin/dev/teogor/querent/api/BuildProfile.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dev.teogor.querent.api

interface BuildProfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dev.teogor.querent.api

import dev.teogor.linguistic.LanguageFamily

interface LanguagesSchema {
var unqualifiedResLocale: LanguageFamily

val supportedLanguages: List<String>

fun addSupportedLanguages(block: SupportedLanguages.() -> Unit)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dev.teogor.querent.api

interface QuerentConfigurator {
var buildFeatures: dev.teogor.querent.api.BuildFeatures

fun buildFeatures(action: dev.teogor.querent.api.BuildFeatures.() -> Unit)

var languagesSchemaOptions: dev.teogor.querent.api.LanguagesSchema

fun languagesSchemaOptions(action: dev.teogor.querent.api.LanguagesSchema.() -> Unit)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dev.teogor.querent.api

import dev.teogor.linguistic.LanguageFamily

interface SupportedLanguages {

operator fun LanguageFamily.unaryPlus()

fun getLanguages(): Array<LanguageFamily>
}
19 changes: 19 additions & 0 deletions querent/api/src/main/kotlin/dev/teogor/querent/api/XmlResources.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dev.teogor.querent.api

interface XmlResources
Loading

0 comments on commit c43cc33

Please sign in to comment.