Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autodoc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val jupiterVersion: String by project
val assertj: String by project

dependencies {
implementation(project(":autodoc-model"))
implementation(project(":runtime-metamodel"))
// Use JUnit test framework for unit tests
testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${jupiterVersion}")
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright (c) 2022 Microsoft Corporation
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

Expand Down
21 changes: 17 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
plugins {
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
id("com.gradle.plugin-publish") version "1.0.0" apply false
checkstyle
`maven-publish`
signing
`java-library`
// for publishing to nexus/ossrh/mavencentral
id("org.gradle.crypto.checksum") version "1.4.0"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
`maven-publish`
signing
id("com.gradle.plugin-publish") version "1.0.0" apply false
}

val groupId: String by project;
Expand Down Expand Up @@ -53,6 +54,18 @@ subprojects {
}
}
}

java {
val javaVersion = 11
toolchain {
languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
tasks.withType(JavaCompile::class.java) {
// making sure the code does not use any APIs from a more recent version.
// Ref: https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
options.release.set(javaVersion.toInt())
}
}
}

// configure checkstyle version
Expand All @@ -65,6 +78,7 @@ subprojects {
mavenCentral()
}


// let's not generate any reports because that is done from within the Github Actions workflow
tasks.withType<Checkstyle> {
reports {
Expand All @@ -76,7 +90,6 @@ subprojects {

}


repositories {
// Use Maven Central for resolving dependencies
mavenCentral()
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
assertj=3.23.1
jupiterVersion=5.9.0
groupId=org.eclipse.dataspaceconnector
projectVersion=0.0.1
projectVersion=0.0.1
jacksonVersion=2.13.3
jetBrainsAnnotationsVersion=15.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ plugins {

val jupiterVersion: String by project
val assertj: String by project
val jetBrainsAnnotationsVersion: String by project
val jacksonVersion: String by project

dependencies {

api("org.jetbrains:annotations:${jetBrainsAnnotationsVersion}")
api("com.fasterxml.jackson.core:jackson-core:${jacksonVersion}")
api("com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}")
api("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}")

// Use JUnit test framework for unit tests
testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${jupiterVersion}")
Expand All @@ -24,8 +33,8 @@ tasks.test {

publishing {
publications {
create<MavenPublication>("autodoc-model") {
artifactId = "autodoc-model"
create<MavenPublication>("runtime-metamodel") {
artifactId = "runtime-metamodel"
from(components["java"])
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Indicates that an extension belongs to the runtime core and should always be loaded first.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface BaseExtension {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Indicates that an extension pertains to the core:transfer module, which will cause it to receive special treatment
* upon extension loading.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface CoreExtension {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Denotes a runtime configuration setting.
*/
@Target({ ElementType.TYPE, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface EdcSetting {

/**
* The setting description.
*/
String value() default "";

String type() default "string";

long min() default Long.MIN_VALUE;

long max() default Long.MAX_VALUE;

/**
* Returns true if the setting is required.
*/
boolean required() default false;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Defines a context for setting keys.
*/
@Target({ ElementType.TYPE, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface EdcSettingContext {
String value();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Denotes an extension module.
*/
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Extension {

/**
* The readable module name.
*/
String value();

/**
* Optional categories used to classify this module.
*/
String[] categories() default "";

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Denotes a service extension point.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface ExtensionPoint {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*
*/

package org.eclipse.dataspaceconnector.runtime.metamodel.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Annotation to be used on a {@code ServiceExtension}'s fields, so that they can be automatically set during
* the extension load phase.
* This annotation has no effect on any class other than a {@code ServiceExtension}.
* <p>
* do NOT @Inherited it, because that complicates things
*/
@Target({ ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface Inject {
boolean required() default true;
}
Loading