refactored the maven project structure so that things are in a simpler tree structure to avoid folks getting lost
@@ -6,8 +6,8 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin.docs</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>docs</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>${basedir}/../stdlib/src</source>
|
<source>${basedir}/../../stdlib/src</source>
|
||||||
<source>${basedir}/../kunit/src/main/kotlin</source>
|
<source>${basedir}/../../kunit/src/main/kotlin</source>
|
||||||
<source>${basedir}/../kotlin-jdbc/src/main/kotlin</source>
|
<source>${basedir}/../../kotlin-jdbc/src/main/kotlin</source>
|
||||||
<source>${basedir}/../kotlin-swing/src/main/kotlin</source>
|
<source>${basedir}/../../kotlin-swing/src/main/kotlin</source>
|
||||||
</sources>
|
</sources>
|
||||||
<title>Kotlin API (${project.version})</title>
|
<title>Kotlin API (${project.version})</title>
|
||||||
<ignorePackages>
|
<ignorePackages>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.jetbrains.kotlin.docs</groupId>
|
||||||
|
<artifactId>docs</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project-root>${project.basedir}/../..</project-root>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>apidoc</module>
|
||||||
|
<module>website</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin.docs</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>docs</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -24,26 +24,6 @@
|
|||||||
<artifactId>pegdown</artifactId>
|
<artifactId>pegdown</artifactId>
|
||||||
<version>${pegdown.version}</version>
|
<version>${pegdown.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- add the kdoc dependency for generating kdoc -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
|
||||||
<artifactId>kdoc</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- TODO not sure why we have to list transitive dependendcies on compiler... -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>asm</groupId>
|
|
||||||
<artifactId>asm-util</artifactId>
|
|
||||||
<version>3.3</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>asm</groupId>
|
|
||||||
<artifactId>asm-commons</artifactId>
|
|
||||||
<version>3.3</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 57 B After Width: | Height: | Size: 57 B |
|
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -1,9 +1,8 @@
|
|||||||
package org.jetbrains.kotlin.site
|
package org.jetbrains.kotlin.site
|
||||||
|
|
||||||
|
import kotlin.test.*
|
||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import org.jetbrains.kotlin.doc.KDocArguments
|
|
||||||
import org.jetbrains.kotlin.doc.KDocCompiler
|
|
||||||
|
|
||||||
class GenerateSiteTest : TestCase() {
|
class GenerateSiteTest : TestCase() {
|
||||||
val srcDir = findTemplateDir()
|
val srcDir = findTemplateDir()
|
||||||
@@ -17,6 +16,20 @@ class GenerateSiteTest : TestCase() {
|
|||||||
generator.run()
|
generator.run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun testCopyApiDocs(): Unit {
|
||||||
|
val outDir = File(siteOutputDir, "versions/$versionDir/apidocs")
|
||||||
|
println("Generating library KDocs to $outDir")
|
||||||
|
|
||||||
|
copyDocResources(outDir)
|
||||||
|
|
||||||
|
val apidocDir = File(siteOutputDir, "../../../apidoc/target/site/apidocs")
|
||||||
|
assertTrue(apidocDir.exists(), "Directory does not exist ${apidocDir.getCanonicalPath()}")
|
||||||
|
|
||||||
|
|
||||||
|
copyRecursive(apidocDir, outDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
fun testGenerateStdlibKDoc(): Unit {
|
fun testGenerateStdlibKDoc(): Unit {
|
||||||
val outDir = File(siteOutputDir, "versions/$versionDir/apidocs")
|
val outDir = File(siteOutputDir, "versions/$versionDir/apidocs")
|
||||||
println("Generating library KDocs to $outDir")
|
println("Generating library KDocs to $outDir")
|
||||||
@@ -64,9 +77,16 @@ class GenerateSiteTest : TestCase() {
|
|||||||
val compiler = KDocCompiler()
|
val compiler = KDocCompiler()
|
||||||
compiler.exec(System.out, args)
|
compiler.exec(System.out, args)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
fun copyDocResources(outDir: File): Unit {
|
fun copyDocResources(outDir: File): Unit {
|
||||||
val sourceDir = File(srcDir, "../apidocs")
|
val sourceDir = File(srcDir, "../apidocs")
|
||||||
|
copyRecursive(sourceDir, outDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO this would make a handy extension function on File :)
|
||||||
|
fun copyRecursive(sourceDir: File, outDir: File): Unit {
|
||||||
sourceDir.recurse {
|
sourceDir.recurse {
|
||||||
if (it.isFile()) {
|
if (it.isFile()) {
|
||||||
var relativePath = sourceDir.relativePath(it)
|
var relativePath = sourceDir.relativePath(it)
|
||||||
@@ -77,7 +97,6 @@ class GenerateSiteTest : TestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun findTemplateDir(): File {
|
fun findTemplateDir(): File {
|
||||||
val path = "src/main/templates"
|
val path = "src/main/templates"
|
||||||
for (p in arrayList(".", "website", "library/website")) {
|
for (p in arrayList(".", "website", "library/website")) {
|
||||||
@@ -11,7 +11,10 @@
|
|||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>kotlin-java</artifactId>
|
<artifactId>kotlin-java-example</artifactId>
|
||||||
|
|
||||||
|
<description>This example shows how the standard kotlin API can be easily used from Java code;
|
||||||
|
its maybe more verbose and not as kool, but still very functional</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
<module>kotlin-java-example</module>
|
||||||
<module>js-example</module>
|
<module>js-example</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -29,18 +29,14 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>kotlin-install</module>
|
<module>tools</module>
|
||||||
<module>runtime</module>
|
|
||||||
<module>kotlin-maven-plugin</module>
|
|
||||||
<module>kdoc-maven-plugin</module>
|
|
||||||
<module>kunit</module>
|
<module>kunit</module>
|
||||||
<module>stdlib</module>
|
<module>stdlib</module>
|
||||||
<module>kdoc</module>
|
|
||||||
<module>kotlin-jdbc</module>
|
<module>kotlin-jdbc</module>
|
||||||
<module>kotlin-java</module>
|
|
||||||
<module>kotlin-swing</module>
|
<module>kotlin-swing</module>
|
||||||
<module>website</module>
|
|
||||||
<module>apidoc</module>
|
<module>docs</module>
|
||||||
<module>examples</module>
|
<module>examples</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>tools</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project-root>${project.basedir}/../..</project-root>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>kotlin-install</module>
|
||||||
|
<module>runtime</module>
|
||||||
|
<module>kotlin-maven-plugin</module>
|
||||||
|
<module>kdoc</module>
|
||||||
|
<module>kdoc-maven-plugin</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-project</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||