Use a separate Knit tool (#1486)
* Use a separate Knit tool version 0.1.2
* Hierarchical knit.properties files are introduced which are
gathered while walking up the directory tree with the properties
in knit resources being top-level ones.
* Freemarker templates for "knit.include" (top-level of example files)
and "test.template" (test template) are introduced with locations that
are resolved from properties.
* KNIT and TEST_OUT directives are not supported anymore.
- Knitting is controlled by "knit.dir" and "knit.pattern" props.
- "test.name" prop or TEST_NAME directive drives test gen.
* All markdown files are now clean of top-level knit-related boilerplate
(only TEST_NAME directive is remaining in some)
* All example files are renumbered. It affects example-basic-xx,
which had the legacy numbering with later insertions.
* All auto-generated files now have the correct source-file name
specified at their beginning, due to consistent use of template
substitution.
* No need to customize knit.pattern anymore (works out-of-the box)
* "knit.name" is automatically generated based on example's file name
"example-basic-01" -> "exampleBasic01"
* Not match-pattern-group woodoo anymore, "knit.pattern" cannot have any
user-defined match groups.
* No need to look for "package xxx" in knitted sources, as the
example's package is always ${knit.package}.${knit.name}
* Simpler test names:
testKotlinxCoroutinesGuideBasic01 -> testExampleBasic01
* Replaced END_TOC with END directive
* Build-scripts are improved:
- Consistent code to use mavenLocal when snapshots versions are used.
- Proper substitution logic to use Android AAR files so that Dokka has correct links to Google APIs.
- Google repository is added to all projects.
diff --git a/kotlinx-coroutines-core/jvm/test/guide/example-cancel-07.kt b/kotlinx-coroutines-core/jvm/test/guide/example-cancel-07.kt
index e2880c9..8c57b42 100644
--- a/kotlinx-coroutines-core/jvm/test/guide/example-cancel-07.kt
+++ b/kotlinx-coroutines-core/jvm/test/guide/example-cancel-07.kt
@@ -1,9 +1,9 @@
/*
- * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
+ * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.guide.cancel07
+// This file was automatically generated from cancellation-and-timeouts.md by Knit tool. Do not edit.
+package kotlinx.coroutines.guide.exampleCancel07
import kotlinx.coroutines.*