Skip to content

Commit

Permalink
Move source to standard Gradle layout
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCreosote committed Apr 26, 2024
1 parent 710b62c commit 3ce448e
Show file tree
Hide file tree
Showing 130 changed files with 30 additions and 102 deletions.
69 changes: 0 additions & 69 deletions .classpath

This file was deleted.

20 changes: 18 additions & 2 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,34 @@
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
25 changes: 2 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ var DEFAULT_URL = "https://ci.kbase.us/services/narrative_method_store/rpc"
var LOC_NMS_SPEC = "$rootDir/NarrativeMethodStore.spec"
var LOC_DOC_HTML = "$rootDir/docshtml"

// TODO NOW run tests from Eclipse w/o specifying classpath manually & remove sourceSets & classpath
// TODO BUILD use jitpacked jars when available

repositories {
Expand Down Expand Up @@ -130,10 +129,10 @@ task sdkCompileLibs {
}

task sdkCompileJava {
// TODO GRADLE is there a variable for src/main/java when we move the code locations?
// TODO GRADLE is there a variable for src/main/java?
var cmd = "kb-sdk compile " +
"--java " +
"--javasrc $rootDir/src " +
"--javasrc $rootDir/src/main/java " +
"--javasrv " +
"--out . " +
"--url $DEFAULT_URL " +
Expand All @@ -152,26 +151,6 @@ task sdkCompile {
dependsOn sdkCompileLibs
}

// Custom java project layout
sourceSets {
main {
java {
srcDirs = ["src"]
exclude '**/test/**'
}
}
test {
java {
srcDirs = ["src"]
include '**/test/**'
}
resources {
srcDirs = ["src"]
include "**/*.properties"
}
}
}

configurations {
// can't directly access testImplementation, so extend and access
testimpl.extendsFrom testImplementation
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.test;
package us.kbase.test.narrativemethodstore;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -38,7 +38,7 @@
import us.kbase.common.service.Tuple4;
import us.kbase.narrativemethodstore.*;
import us.kbase.narrativemethodstore.db.DynamicRepoDB;
import us.kbase.narrativemethodstore.db.mongo.test.MongoDBHelper;
import us.kbase.test.narrativemethodstore.db.mongo.MongoDBHelper;

/**
* Client-server JSON-RPC test for Narrative Method Store.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.db.test;
package us.kbase.test.narrativemethodstore.db;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.db.test;
package us.kbase.test.narrativemethodstore.db;

import junit.framework.Assert;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.db.test;
package us.kbase.test.narrativemethodstore.db;

import java.io.File;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.db.mongo.test;
package us.kbase.test.narrativemethodstore.db.mongo;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.db.mongo.test;
package us.kbase.test.narrativemethodstore.db.mongo;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package us.kbase.narrativemethodstore.db.mongo.test;
package us.kbase.test.narrativemethodstore.db.mongo;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I'm not really sure if this file is needed anymore, but `devmin` is referenced in
`test/data/test_repo_1/Dockerfile`

0 comments on commit 3ce448e

Please sign in to comment.