Skip to content

Commit

Permalink
Switched to multi-module Gradle project to separate on-premises insta…
Browse files Browse the repository at this point in the history
…llation from the plugin API.
  • Loading branch information
simonbrowndotje committed Aug 24, 2023
1 parent dd378a8 commit d71dd8d
Show file tree
Hide file tree
Showing 217 changed files with 368 additions and 136 deletions.
60 changes: 32 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,39 @@ docs/workspace.json

.gradle/*
build/*
structurizr-onpremises/build/*
structurizr-onpremises-plugin/build/*
.idea/*
**/structurizr.log

src/main/webapp/static/js/*
src/main/webapp/static/bootstrap-icons/*
src/main/webapp/static/css/*
src/main/webapp/static/html/*
src/main/webapp/static/img/*
structurizr-onpremises/src/main/webapp/static/js/*
structurizr-onpremises/src/main/webapp/static/bootstrap-icons/*
structurizr-onpremises/src/main/webapp/static/css/*
structurizr-onpremises/src/main/webapp/static/html/*
structurizr-onpremises/src/main/webapp/static/img/*

src/main/webapp/WEB-INF/fragments/graphviz.jspf
src/main/webapp/WEB-INF/fragments/progress-message.jspf
src/main/webapp/WEB-INF/fragments/quick-navigation.jspf
src/main/webapp/WEB-INF/fragments/tooltip.jspf
src/main/webapp/WEB-INF/fragments/diagrams/*
!src/main/webapp/WEB-INF/fragments/diagrams/publish.jspf
src/main/webapp/WEB-INF/fragments/decisions/*
src/main/webapp/WEB-INF/fragments/dsl/*
src/main/webapp/WEB-INF/fragments/workspace/load-via-inline.jspf
src/main/webapp/WEB-INF/fragments/workspace/load-via-api.jspf
src/main/webapp/WEB-INF/fragments/workspace/javascript.jspf
src/main/webapp/WEB-INF/fragments/workspace/client-side-encryption-passphrase-modal.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/graphviz.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/progress-message.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/quick-navigation.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/tooltip.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/diagrams/*
!structurizr-onpremises/src/main/webapp/WEB-INF/fragments/diagrams/publish.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/decisions/*
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/dsl/*
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/workspace/load-via-inline.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/workspace/load-via-api.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/workspace/javascript.jspf
structurizr-onpremises/src/main/webapp/WEB-INF/fragments/workspace/client-side-encryption-passphrase-modal.jspf

src/main/webapp/WEB-INF/views/404.jsp
src/main/webapp/WEB-INF/views/500.jsp
src/main/webapp/WEB-INF/views/error.jsp
src/main/webapp/WEB-INF/views/diagrams.jsp
src/main/webapp/WEB-INF/views/decisions.jsp
src/main/webapp/WEB-INF/views/documentation.jsp
src/main/webapp/WEB-INF/views/explore.jsp
src/main/webapp/WEB-INF/views/graph.jsp
src/main/webapp/WEB-INF/views/tree.jsp
src/main/webapp/WEB-INF/views/review-create.jsp
src/main/webapp/WEB-INF/views/review.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/404.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/500.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/error.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/diagrams.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/decisions.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/dependencies.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/documentation.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/explore.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/graph.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/tree.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/review-create.jsp
structurizr-onpremises/src/main/webapp/WEB-INF/views/review.jsp
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ The integration tests use Testcontainers to start an Elasticsearch instance. If
`./gradlew clean build -x integrationTest` to exclude the integration tests.


If successful, you will see a file named `structurizr-onpremises.war` in `build/libs`.
If successful, you will see a file named `structurizr-onpremises.war` in `structurizr-onpremises/build/libs`.
To then build a Docker image:

```
cd structurizr-onpremises
docker build . -t mytag
```

Expand Down
Binary file removed lib/structurizr-onpremises-plugins.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rootProject.name = 'structurizr-onpremises'
include 'structurizr-onpremises'
include 'structurizr-onpremises-plugin'

This file was deleted.

This file was deleted.

93 changes: 93 additions & 0 deletions structurizr-onpremises-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'

defaultTasks 'clean', 'compileJava', 'test'

repositories {
mavenCentral()
}

dependencies {
api 'com.structurizr:structurizr-client:1.26.1'

testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
}

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

sourceCompatibility = 11
targetCompatibility = 11

description = 'Plugin APIs for the Structurizr on-premises installation'
group = 'com.structurizr'
version = '0.0.1'

test {
useJUnitPlatform()
}

java {
withJavadocJar()
withSourcesJar()
}

jar {
manifest {
attributes(
'Implementation-Title': description,
'Implementation-Version': version
)
}
}

publishing {
repositories {
maven {
name = "ossrh"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}

publications {
mavenJava(MavenPublication) {
from components.java

pom {
name = 'structurizr-onpremises-plugins'
description = 'Plugin APIs for the Structurizr on-premises installation'
url = 'https://github.com/structurizr/onpremises'

scm {
connection = 'scm:git:git://github.com/structurizr/onpremises.git'
developerConnection = 'scm:git:[email protected]:structurizr/onpremises.git'
url = 'https://github.com/structurizr/onpremises'
}

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id = "simon"
name = "Simon Brown"
email = "[email protected]"
}
}
}
}
}
}

signing {
sign publishing.publications.mavenJava
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.structurizr.onpremises.component.workspace;

public interface WorkspaceEvent {

WorkspaceProperties getWorkspaceProperties();

String getJson();

void setJson(String json);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.structurizr.onpremises.component.workspace;

import com.structurizr.configuration.User;
import com.structurizr.configuration.Visibility;

import java.util.Date;
import java.util.Set;

public interface WorkspaceProperties {

long getId();

String getName();

String getDescription();

Date getLastModifiedDate();

Visibility getVisibility();

Set<User> getUsers();

}
File renamed without changes.
Loading

0 comments on commit d71dd8d

Please sign in to comment.