@@ -6,6 +6,15 @@ import org.gradle.api.tasks.Internal
66import  org.gradle.api.tasks.Nested 
77import  org.gradle.work.DisableCachingByDefault 
88
9+ private  const  val  DEPRECATION_MESSAGE  =  """ 
10+     It is an anti-pattern to declare cross-project dependencies as it leads to various build problems.  
11+     For this reason, this API wil be removed with the introduction of project isolation.  
12+     When it happens, we will provide a migration guide. In the meantime, you can keep using this API 
13+     if you have to, but please don't rely on it if possible. If you don't want to document a certain project, 
14+     don't apply the Dokka plugin for it, or disable individual project tasks using the Gradle API . 
15+ """ 
16+ 
17+ @Suppress(" DEPRECATION" 
918@DisableCachingByDefault(because =  " Abstract super-class, not to be instantiated directly" 
1019abstract  class  AbstractDokkaParentTask  : AbstractDokkaTask () {
1120
@@ -21,50 +30,60 @@ abstract class AbstractDokkaParentTask : AbstractDokkaTask() {
2130            .toSet()
2231
2332    /*  By task reference */ 
33+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
2434    fun  addChildTask (task :  AbstractDokkaTask ) {
2535        childDokkaTaskPaths =  childDokkaTaskPaths +  task.path
2636    }
2737
38+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
2839    fun  removeChildTask (task :  AbstractDokkaTask ) {
2940        childDokkaTaskPaths =  childDokkaTaskPaths -  task.path
3041    }
3142
3243    /*  By path */ 
44+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
3345    fun  addChildTask (path :  String ) {
3446        childDokkaTaskPaths =  childDokkaTaskPaths +  project.absoluteProjectPath(path)
3547    }
3648
49+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
3750    fun  removeChildTask (path :  String ) {
3851        childDokkaTaskPaths =  childDokkaTaskPaths -  project.absoluteProjectPath(path)
3952    }
4053
4154    /*  By project reference and name */ 
55+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
4256    fun  addChildTasks (projects :  Iterable <Project >, childTasksName :  String ) {
4357        projects.forEach { project -> 
4458            addChildTask(project.absoluteProjectPath(childTasksName))
4559        }
4660    }
4761
62+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
4863    fun  removeChildTasks (projects :  Iterable <Project >, childTasksName :  String ) {
4964        projects.forEach { project -> 
5065            removeChildTask(project.absoluteProjectPath(childTasksName))
5166        }
5267    }
5368
69+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
5470    fun  addSubprojectChildTasks (childTasksName :  String ) {
5571        addChildTasks(project.subprojects, childTasksName)
5672    }
5773
74+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
5875    fun  removeSubprojectChildTasks (childTasksName :  String ) {
5976        removeChildTasks(project.subprojects, childTasksName)
6077    }
6178
79+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
6280    fun  removeChildTasks (project :  Project ) {
6381        childDokkaTaskPaths =  childDokkaTaskPaths.filter { path -> 
6482            parsePath(path).parent !=  parsePath(project.path)
6583        }.toSet()
6684    }
6785
86+     @Deprecated(message =  DEPRECATION_MESSAGE , level =  DeprecationLevel .WARNING )
6887    fun  removeChildTasks (projects :  Iterable <Project >) {
6988        projects.forEach { project ->  removeChildTasks(project) }
7089    }
0 commit comments