[BT] Move ClassSnapshotGranularity to the Build Tools API module
#KT-57565 In Progress
This commit is contained in:
committed by
Space Team
parent
442d1cf711
commit
329fd6be45
@@ -85,6 +85,13 @@ public final class org/jetbrains/kotlin/buildtools/api/SourcesChanges$Unknown :
|
||||
public abstract interface class org/jetbrains/kotlin/buildtools/api/jvm/ClassSnapshot {
|
||||
}
|
||||
|
||||
public final class org/jetbrains/kotlin/buildtools/api/jvm/ClassSnapshotGranularity : java/lang/Enum {
|
||||
public static final field CLASS_LEVEL Lorg/jetbrains/kotlin/buildtools/api/jvm/ClassSnapshotGranularity;
|
||||
public static final field CLASS_MEMBER_LEVEL Lorg/jetbrains/kotlin/buildtools/api/jvm/ClassSnapshotGranularity;
|
||||
public static fun valueOf (Ljava/lang/String;)Lorg/jetbrains/kotlin/buildtools/api/jvm/ClassSnapshotGranularity;
|
||||
public static fun values ()[Lorg/jetbrains/kotlin/buildtools/api/jvm/ClassSnapshotGranularity;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/kotlin/buildtools/api/jvm/ClasspathEntrySnapshot {
|
||||
public abstract fun getClassSnapshots ()Ljava/util/LinkedHashMap;
|
||||
public abstract fun saveSnapshot (Ljava/io/File;)V
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.buildtools.api.jvm
|
||||
|
||||
/**
|
||||
* The granularity of a [ClassSnapshot].
|
||||
*
|
||||
* There are currently two granularity levels:
|
||||
* - [CLASS_LEVEL]) (coarse-grained): The size of the snapshot will be smaller, but we will have coarse-grained classpath changes, which
|
||||
* means more source files will be recompiled.
|
||||
* - [CLASS_MEMBER_LEVEL] (fine-grained): The size of the snapshot will be larger, but we will have fine-grained classpath changes, which
|
||||
* means fewer source files will be recompiled.
|
||||
*
|
||||
* Therefore, [CLASS_LEVEL] is typically suitable for classes that are infrequently changed (e.g., external libraries), whereas
|
||||
* [CLASS_MEMBER_LEVEL] is suitable for classes that are frequently changed (e.g., classes produced by the current project).
|
||||
*/
|
||||
public enum class ClassSnapshotGranularity {
|
||||
|
||||
/**
|
||||
* Snapshotting level that allows tracking whether a .class file has changed without tracking what specific parts of the .class file
|
||||
* (e.g., fields or methods) have changed.
|
||||
*/
|
||||
CLASS_LEVEL,
|
||||
|
||||
/**
|
||||
* Snapshotting level that allows tracking not only whether a .class file has changed but also what specific parts of the .class file
|
||||
* (e.g., fields or methods) have changed.
|
||||
*/
|
||||
CLASS_MEMBER_LEVEL
|
||||
}
|
||||
Reference in New Issue
Block a user