Skip to content

Commit

Permalink
move config of wedpr-adm to other sub-project (#24)
Browse files Browse the repository at this point in the history
* move config of wedpr-adm to other sub-project

* fix gradlew run out of jvm memory
  • Loading branch information
cyjseagull authored Aug 28, 2024
1 parent 32880db commit b5d50d6
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 18 deletions.
13 changes: 5 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'maven-publish'
id 'java-library'
id 'java'
id 'org.ajoberstar.grgit' version '4.1.1'
id 'com.github.sherter.google-java-format' version '0.8'
}
println("* Notice: current gradle version is " + gradle.gradleVersion)
// Additional attribute definition
Expand Down Expand Up @@ -73,8 +75,6 @@ allprojects {
html.enabled false
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
Expand Down Expand Up @@ -163,7 +163,6 @@ subprojects {
}
resources {
srcDir 'src/main/resources'
srcDir 'src/main/java'
}
}
integrationTest {
Expand All @@ -175,6 +174,8 @@ subprojects {
resources.srcDir file('src/integration-test/resources')
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
Expand All @@ -201,7 +202,6 @@ subprojects {

tasks.register('sourcesJar', Jar) {
from sourceSets.main.allSource
include '**/*.xml'
archiveClassifier = 'sources'
}

Expand Down Expand Up @@ -310,14 +310,11 @@ subprojects {
}
}
}

googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}


check.dependsOn jacocoTestReport
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.jvmargs=-Xmx4096m
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
*
*/

package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.authorization.config;

import com.webank.wedpr.components.authorization.dao.AuthMapperWrapper;
import com.webank.wedpr.components.authorization.service.impl.AuthSyncer;
import com.webank.wedpr.components.sync.ResourceSyncer;
import com.webank.wedpr.components.sync.config.ResourceSyncerConfig;
import com.webank.wedpr.core.config.WeDPRCommonConfig;
import com.webank.wedpr.core.utils.ThreadPoolService;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
1 change: 1 addition & 0 deletions wedpr-components/leader-election/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ plugins {

dependencies {
compile project(":wedpr-components-sys-config")
compile project(":wedpr-components-uuid")
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
*
*/

package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.leader.election.config;

import com.webank.wedpr.components.leader.election.LeaderElection;
import com.webank.wedpr.components.leader.election.impl.ElectionConfig;
import com.webank.wedpr.components.leader.election.impl.LeaderElectionImpl;
import com.webank.wedpr.components.meta.sys.config.WeDPRSysConfig;
import com.webank.wedpr.components.meta.sys.config.loader.SysConfigLoader;
import com.webank.wedpr.components.uuid.generator.WeDPRUuidGenerator;
import com.webank.wedpr.core.config.WeDPRConfig;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
and `name` like concat(#{condition.name}, '%')
</if>
<if test="condition.type != null and condition.type !=''">
and `type` = condition.type
and `type` = #{condition.type}
</if>
<if test="condition.owner != null and condition.owner !=''">
and `owner` = #{condition.owner}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* the License.
*
*/
package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.meta.sys.config.loader;

import com.webank.wedpr.components.meta.sys.config.WeDPRSysConfig;
import com.webank.wedpr.components.meta.sys.config.dao.SysConfigMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
*
*/

package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.scheduler.config;

import com.webank.wedpr.components.scheduler.executor.impl.model.FileMetaBuilder;
import com.webank.wedpr.components.storage.builder.StoragePathBuilder;
import com.webank.wedpr.components.storage.config.HdfsStorageConfig;
import com.webank.wedpr.components.storage.config.LocalStorageConfig;
import com.webank.wedpr.components.sync.config.ResourceSyncerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/

package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.scheduler.config;

import com.webank.wedpr.components.project.JobChecker;
import com.webank.wedpr.components.project.dao.JobDO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
*
*/

package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.scheduler.config;

import com.webank.wedpr.components.project.dao.ProjectMapperWrapper;
import com.webank.wedpr.components.scheduler.core.JobSyncer;
import com.webank.wedpr.components.scheduler.core.SchedulerTaskImpl;
import com.webank.wedpr.components.sync.ResourceSyncer;
import com.webank.wedpr.components.sync.config.ResourceSyncerConfig;
import com.webank.wedpr.core.config.WeDPRCommonConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/

package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.scheduler.config;

import com.webank.wedpr.components.project.JobChecker;
import com.webank.wedpr.components.project.dao.ProjectMapperWrapper;
Expand All @@ -25,6 +25,7 @@
import com.webank.wedpr.components.storage.config.HdfsStorageConfig;
import com.webank.wedpr.components.storage.config.LocalStorageConfig;
import com.webank.wedpr.components.sync.ResourceSyncer;
import com.webank.wedpr.components.sync.config.ResourceSyncerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
* the License.
*
*/
package com.webank.wedpr.adm.config;
package com.webank.wedpr.components.sync.config;

import com.webank.wedpr.components.leader.election.LeaderElection;
import com.webank.wedpr.components.leader.election.config.LeaderElectionConfig;
import com.webank.wedpr.components.meta.sys.config.WeDPRSysConfig;
import com.webank.wedpr.components.sync.ResourceSyncer;
import com.webank.wedpr.components.sync.dao.SyncStatusMapper;
Expand All @@ -34,7 +35,7 @@
import org.springframework.context.annotation.Scope;

@Configuration
@AutoConfigureAfter(LeaderElection.class)
@AutoConfigureAfter(LeaderElectionConfig.class)
public class ResourceSyncerConfig {
private static final Logger logger = LoggerFactory.getLogger(ResourceSyncerConfig.class);

Expand Down

0 comments on commit b5d50d6

Please sign in to comment.