Refactor project structure.
This commit is contained in:
@@ -41,9 +41,9 @@ compileJava {
|
||||
}
|
||||
|
||||
task generateClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
|
||||
dependsOn ':common-api:resolve'
|
||||
dependsOn ':service-api:resolve'
|
||||
generatorName = "java"
|
||||
inputSpec = "$projectDir/../common-api/build/swagger/mowesta.json"
|
||||
inputSpec = "$projectDir/../service-api/build/swagger/mowesta.json"
|
||||
outputDir = "$projectDir/build/swagger/"
|
||||
typeMappings.putAll(["Geometry":"org.geojson.Geometry"])
|
||||
generateModelTests = false
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ allprojects {
|
||||
// wildfly dependencies, keep in sync
|
||||
versionJackson = '2.14.3'
|
||||
versionResteasy = '6.2.5.Final'
|
||||
versionWildfly = '21.0.0.Final'
|
||||
versionWildfly = '31.0.1.Final'
|
||||
versionPicketbox = '5.0.3.Final'
|
||||
versionHibernate = '6.2.2.Final'
|
||||
versionHibernateSearch = '6.2.2.Final'
|
||||
|
||||
@@ -6,7 +6,7 @@ description = "MoWeSta iOS Api"
|
||||
|
||||
openApiGenerate {
|
||||
generatorName = "swift5"
|
||||
inputSpec = project(':common-api:').buildDir.path + '/swagger/mowesta.json'
|
||||
inputSpec = project(':service-api:').buildDir.path + '/swagger/mowesta.json'
|
||||
outputDir = "${project.buildDir}/swagger"
|
||||
configOptions = [
|
||||
removeMigrationProjectNameClass: "true",
|
||||
@@ -36,7 +36,7 @@ task fixApiClient() {
|
||||
|
||||
// require api build to access swagger definition
|
||||
tasks.register("build") { }
|
||||
tasks['openApiGenerate'].dependsOn(project(':common-api').tasks['build'])
|
||||
tasks['openApiGenerate'].dependsOn(project(':service-api').tasks['build'])
|
||||
// require swagger code gen before compilation
|
||||
build.dependsOn('openApiGenerate')
|
||||
fixApiClient.dependsOn('openApiGenerate')
|
||||
|
||||
@@ -2,7 +2,7 @@ plugins {
|
||||
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.19'
|
||||
}
|
||||
|
||||
description = 'MoWeSta Common Api'
|
||||
description = 'MoWeSta Service Api'
|
||||
|
||||
configurations {
|
||||
// add a configuration to support swagger generation for jakarta namespace
|
||||
@@ -6,7 +6,7 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':common-api')
|
||||
api project(':service-api')
|
||||
|
||||
api "de.grundid.opendatalab:geojson-jackson:${versionGeojson}"
|
||||
api 'commons-net:commons-net:3.5'
|
||||
|
||||
@@ -7,7 +7,7 @@ configurations {
|
||||
|
||||
|
||||
dependencies {
|
||||
api project(':common-api')
|
||||
api project(':service-api')
|
||||
api project(':service-data')
|
||||
|
||||
api "org.mapstruct:mapstruct-jdk8:${mapstructVersion}"
|
||||
|
||||
@@ -15,6 +15,7 @@ import javax.security.auth.Subject;
|
||||
import javax.security.auth.login.LoginContext;
|
||||
import javax.security.auth.login.LoginException;
|
||||
|
||||
import jakarta.annotation.security.RunAs;
|
||||
import jakarta.enterprise.inject.spi.CDI;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.xml.bind.JAXBContext;
|
||||
|
||||
@@ -4,7 +4,7 @@ import jakarta.ejb.EJB;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.persistence.EntityManager;
|
||||
|
||||
import org.hibernate.search.jpa.Search;
|
||||
import org.hibernate.search.mapper.orm.Search;
|
||||
import org.jboss.arquillian.junit.Arquillian;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
@@ -16,7 +16,6 @@ import com.mowesta.api.Language;
|
||||
import com.mowesta.api.PageConfig;
|
||||
import com.mowesta.api.SearchContext;
|
||||
import com.mowesta.api.location.CityPage;
|
||||
import com.mowesta.api.location.CityType;
|
||||
import com.mowesta.api.location.LocationHierarchy;
|
||||
import com.mowesta.api.location.LocationHierarchyPage;
|
||||
import com.mowesta.api.location.LocationType;
|
||||
@@ -56,7 +55,7 @@ public class LocationSessionTest extends AbstractSessionTest {
|
||||
@Before
|
||||
public void rebuildIndex() throws Exception {
|
||||
if (!indexed) {
|
||||
Search.getFullTextEntityManager(em).createIndexer().startAndWait();
|
||||
Search.session(em).massIndexer().startAndWait();
|
||||
indexed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ jar {
|
||||
}
|
||||
|
||||
war {
|
||||
dependsOn ':common-api:resolve'
|
||||
from( new File(project(":common-api").buildDir, "/swagger/") ) {
|
||||
dependsOn ':service-api:resolve'
|
||||
from( new File(project(":service-api").buildDir, "/swagger/") ) {
|
||||
include 'mowesta.json'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
# ignore wildfly install
|
||||
wildfly-17.0.1.Final/
|
||||
wildfly-21.0.0.Final/
|
||||
wildfly-31.0.1.Final/
|
||||
|
||||
+1
-1
@@ -1,10 +1,10 @@
|
||||
rootProject.name = 'mowesta'
|
||||
include(':common-api')
|
||||
include(':android-api')
|
||||
include(':android-sdk')
|
||||
include(':android-app')
|
||||
include(':ios-api')
|
||||
include(':ios-app')
|
||||
include(':service-api')
|
||||
include(':service-wildfly')
|
||||
include(':service-data')
|
||||
include(':service-jpa')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
description = 'MoWeSta Export Tool'
|
||||
|
||||
dependencies {
|
||||
implementation project(':common-api')
|
||||
implementation project(':service-api')
|
||||
implementation "org.jboss.resteasy:resteasy-jackson2-provider:${versionResteasy}"
|
||||
implementation "org.jboss.resteasy:resteasy-client:${versionResteasy}"
|
||||
implementation "commons-cli:commons-cli:${versionCli}"
|
||||
@@ -9,7 +9,7 @@ dependencies {
|
||||
|
||||
// builds a jar with all dependencies for the export tool
|
||||
task fatJar(type: Jar) {
|
||||
dependsOn += ':common-api:build'
|
||||
dependsOn += ':service-api:build'
|
||||
duplicatesStrategy = 'exclude'
|
||||
archiveClassifier = 'fat'
|
||||
manifest {
|
||||
|
||||
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -70,9 +70,9 @@ task buildSearch(type: IoNodeTask) {
|
||||
}
|
||||
|
||||
task generateClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
|
||||
dependsOn 'cleanup', ':common-api:resolve'
|
||||
dependsOn 'cleanup', ':service-api:resolve'
|
||||
generatorName = "typescript-angular"
|
||||
inputSpec = "$projectDir/../common-api/build/swagger/mowesta.json"
|
||||
inputSpec = "$projectDir/../service-api/build/swagger/mowesta.json"
|
||||
outputDir = "$projectDir/src/api/"
|
||||
configOptions = [
|
||||
apiModulePrefix: "MoWeSta",
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<button mat-icon-button [matTooltip]="res.strings('manage_users_delete_tooltip')" (click)="onDelete(element)" [disabled]="loading.getValue()">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
@if(isAdmin[element]){
|
||||
@if(isAdmin(element)){
|
||||
<ng-container>
|
||||
<button mat-icon-button [matTooltip]="res.strings('manage_users_user_tooltip')" (click)="makeUser(element)" [disabled]="loading.getValue()">
|
||||
<mat-icon>face</mat-icon>
|
||||
|
||||
Reference in New Issue
Block a user