From 7658bc5f7a43da4cfd2764939b05921b126b6109 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sat, 13 Sep 2025 09:37:27 +0800 Subject: [PATCH 1/5] doc: Update domain and add gtag --- docs/docusaurus.config.ts | 269 +++++++++++++++++++------------------- 1 file changed, 138 insertions(+), 131 deletions(-) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index a9604ff..a7a9cc5 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -8,16 +8,20 @@ import versionInfo from './src/version.json'; * @see https://github.com/facebook/docusaurus/issues/4542#issuecomment-1434839071 */ function getSiteTagline() { - switch(process.env.DOCUSAURUS_CURRENT_LOCALE) { - case "zh-CN": return '让 suspend 不再害羞'; - default: return 'Make suspend no longer shy'; - } + switch (process.env.DOCUSAURUS_CURRENT_LOCALE) { + case "zh-CN": + return '让 suspend 不再害羞'; + default: + return 'Make suspend no longer shy'; + } } function getAnnouncementBarContent() { - switch(process.env.DOCUSAURUS_CURRENT_LOCALE) { - case "zh-CN": return '🚧 抱歉!本文档仍在建设中 - 如果你发现任何问题,请告诉我们!我们很乐意听取你的意见! 🌟'; - default: return '🚧 Oops! This doc is still under construction - If you spot any quirks, give us a shout! We\'d love to hear from you! 🌟'; + switch (process.env.DOCUSAURUS_CURRENT_LOCALE) { + case "zh-CN": + return '🚧 抱歉!本文档仍在建设中 - 如果你发现任何问题,请告诉我们!我们很乐意听取你的意见! 🌟'; + default: + return '🚧 Oops! This doc is still under construction - If you spot any quirks, give us a shout! We\'d love to hear from you! 🌟'; } } @@ -30,142 +34,145 @@ function getAnnouncementBar() { } const config: Config = { - title: 'Kotlin Suspend Transform Compiler Plugin', - tagline: getSiteTagline(), // 'Make suspend less shy', - favicon: 'img/favicon.ico', + title: 'Kotlin Suspend Transform Compiler Plugin', + tagline: getSiteTagline(), // 'Make suspend less shy', + favicon: 'https://github.com/ForteScarlet.png', - // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future - future: { - v4: true, // Improve compatibility with the upcoming Docusaurus v4 - }, + // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future + future: { + v4: true, // Improve compatibility with the upcoming Docusaurus v4 + }, - // Set the production url of your site here - url: 'https://fortescarlet.github.io', - // Set the // pathname under which your site is served - // For GitHub pages deployment, it is often '//' - baseUrl: '/kotlin-suspend-transform-compiler-plugin/', + // Set the production url of your site here + url: 'https://kstcp.forte.love', + // Set the // pathname under which your site is served + // For GitHub pages deployment, it is often '//' + baseUrl: '/', - // GitHub pages deployment config. - // If you aren't using GitHub pages, you don't need these. - organizationName: 'ForteScarlet', // Usually your GitHub org/user name. - projectName: 'kotlin-suspend-transform-compiler-plugin', // Usually your repo name. - trailingSlash: false, + // GitHub pages deployment config. + // If you aren't using GitHub pages, you don't need these. + organizationName: 'ForteScarlet', // Usually your GitHub org/user name. + projectName: 'kotlin-suspend-transform-compiler-plugin', // Usually your repo name. + trailingSlash: false, - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'warn', - // Even if you don't use internationalization, you can use this field to set - // useful metadata like html lang. For example, if your site is Chinese, you - // may want to replace "en" with "zh-Hans". - i18n: { - defaultLocale: 'en', - locales: ['en', 'zh-CN'], - localeConfigs: { - en: { - htmlLang: 'en', - }, - 'zh-CN': { - htmlLang: 'zh-CN', - }, - }, - }, - - presets: [ - [ - 'classic', - { - docs: { - sidebarPath: './sidebars.ts', - // Please change this to your repo. - // Remove this to remove the "edit this page" links. - // editUrl: ({locale, docPath}) => { - // if (locale === 'zh-CN') { - // return `https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/tree/dev/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/${docPath}`; - // } - // return `https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/tree/dev/docs/${docPath}`; - // }, - editUrl: 'https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/tree/dev/docs/', - editLocalizedFiles: true, - showLastUpdateTime: true, - lastVersion: 'current', - versions: { - current: { - badge: true, - label: 'v' + versionInfo.version, + // Even if you don't use internationalization, you can use this field to set + // useful metadata like html lang. For example, if your site is Chinese, you + // may want to replace "en" with "zh-Hans". + i18n: { + defaultLocale: 'en', + locales: ['en', 'zh-CN'], + localeConfigs: { + en: { + htmlLang: 'en', + }, + 'zh-CN': { + htmlLang: 'zh-CN', }, - } - }, - theme: { - customCss: './src/css/custom.css', }, - } satisfies Preset.Options, + }, + + presets: [ + [ + 'classic', + { + docs: { + sidebarPath: './sidebars.ts', + // Please change this to your repo. + // Remove this to remove the "edit this page" links. + // editUrl: ({locale, docPath}) => { + // if (locale === 'zh-CN') { + // return `https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/tree/dev/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/${docPath}`; + // } + // return `https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/tree/dev/docs/${docPath}`; + // }, + editUrl: 'https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/tree/dev/docs/', + editLocalizedFiles: true, + showLastUpdateTime: true, + lastVersion: 'current', + versions: { + current: { + badge: true, + label: 'v' + versionInfo.version, + }, + } + }, + googleTagManager: { + containerId: 'G-BQ000Q8R34', + }, + theme: { + customCss: './src/css/custom.css', + }, + } satisfies Preset.Options, + ], ], - ], - themeConfig: { - announcementBar: getAnnouncementBar(), - // Replace with your project's social card - // image: 'img/docusaurus-social-card.jpg', - navbar: { - title: 'Kotlin Suspend Transform Compiler Plugin', - // logo: { - // alt: 'Logo', - // src: 'img/logo.svg', - // }, - items: [ - { - type: 'docSidebar', - sidebarId: 'documentationSidebar', - position: 'left', - label: 'Documentation', - }, - { - type: 'docsVersionDropdown', - position: 'right', - versions: ['current'], + themeConfig: { + announcementBar: getAnnouncementBar(), + // Replace with your project's social card + // image: 'img/docusaurus-social-card.jpg', + navbar: { + title: 'Kotlin Suspend Transform Compiler Plugin', + // logo: { + // alt: 'Logo', + // src: 'img/logo.svg', + // }, + items: [ + { + type: 'docSidebar', + sidebarId: 'documentationSidebar', + position: 'left', + label: 'Documentation', + }, + { + type: 'docsVersionDropdown', + position: 'right', + versions: ['current'], + }, + { + href: 'https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin', + position: 'right', + className: 'header-github-link', + 'aria-label': 'GitHub repository', + }, + { + type: 'localeDropdown', + position: 'right', + }, + ], }, - { - href: 'https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin', - position: 'right', - className: 'header-github-link', - 'aria-label': 'GitHub repository', + footer: { + style: 'dark', + links: [ + { + title: 'Docs', + items: [ + { + label: 'Documentation', + to: '/docs/', + }, + ], + }, + { + title: 'More', + items: [ + { + label: 'GitHub', + href: 'https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin', + }, + ], + }, + ], + copyright: `Copyright © 2022-${new Date().getFullYear()} ForteScarlet, Inc. Built with Docusaurus.`, }, - { - type: 'localeDropdown', - position: 'right', + prism: { + theme: prismThemes.github, + darkTheme: prismThemes.dracula, + additionalLanguages: ['java', 'kotlin'], }, - ], - }, - footer: { - style: 'dark', - links: [ - { - title: 'Docs', - items: [ - { - label: 'Documentation', - to: '/docs/', - }, - ], - }, - { - title: 'More', - items: [ - { - label: 'GitHub', - href: 'https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin', - }, - ], - }, - ], - copyright: `Copyright © 2022-${new Date().getFullYear()} ForteScarlet, Inc. Built with Docusaurus.`, - }, - prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, - additionalLanguages: ['java', 'kotlin'], - }, - } satisfies Preset.ThemeConfig, + } satisfies Preset.ThemeConfig, }; export default config; From 4e3b8b4741aa69bc89f3777fda3d4279fb568210 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sat, 13 Sep 2025 09:41:59 +0800 Subject: [PATCH 2/5] doc: config gtag --- docs/docusaurus.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index a7a9cc5..ed06905 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -99,8 +99,8 @@ const config: Config = { }, } }, - googleTagManager: { - containerId: 'G-BQ000Q8R34', + gtag: { + trackingID: 'G-BQ000Q8R34', }, theme: { customCss: './src/css/custom.css', From a75fc839a347b9c9623b4540d703e4d1d8d2937a Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sat, 13 Sep 2025 14:46:19 +0800 Subject: [PATCH 3/5] improve(doc): Improve the presentation of HomepageHeader's title and tagline --- docs/src/css/custom.css | 67 ++++++++++++++++++++++------------------ docs/src/pages/index.tsx | 21 +++++++++++-- 2 files changed, 55 insertions(+), 33 deletions(-) diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 307637d..d3cd1ba 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -6,55 +6,62 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2563eb; - --ifm-color-primary-dark: #1d4ed8; - --ifm-color-primary-darker: #1e40af; - --ifm-color-primary-darkest: #1e3a8a; - --ifm-color-primary-light: #3b82f6; - --ifm-color-primary-lighter: #60a5fa; - --ifm-color-primary-lightest: #93c5fd; - --ifm-code-font-size: 95%; - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + --ifm-color-primary: #2563eb; + --ifm-color-primary-dark: #1d4ed8; + --ifm-color-primary-darker: #1e40af; + --ifm-color-primary-darkest: #1e3a8a; + --ifm-color-primary-light: #3b82f6; + --ifm-color-primary-lighter: #60a5fa; + --ifm-color-primary-lightest: #93c5fd; + --ifm-code-font-size: 95%; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme='dark'] { - --ifm-color-primary: #60a5fa; - --ifm-color-primary-dark: #3b82f6; - --ifm-color-primary-darker: #2563eb; - --ifm-color-primary-darkest: #1d4ed8; - --ifm-color-primary-light: #93c5fd; - --ifm-color-primary-lighter: #bfdbfe; - --ifm-color-primary-lightest: #dbeafe; - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); + --ifm-color-primary: #60a5fa; + --ifm-color-primary-dark: #3b82f6; + --ifm-color-primary-darker: #2563eb; + --ifm-color-primary-darkest: #1d4ed8; + --ifm-color-primary-light: #93c5fd; + --ifm-color-primary-lighter: #bfdbfe; + --ifm-color-primary-lightest: #dbeafe; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); +} + +[data-theme='dark'] .header_hero_text { + /*filter: grayscale(100%); !* Restrict colors to black and white *!*/ + /*!* Using mix-blend-mode to create automatic contrast with only black/white shades *!*/ + /*mix-blend-mode: difference;*/ + color: white; /* Base color that will be inverted by mix-blend-mode */ } /* GitHub icon styling */ .header-github-link:hover { - opacity: 0.6; + opacity: 0.6; } .header-github-link:before { - content: ''; - width: 24px; - height: 24px; - display: flex; - background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; + content: ''; + width: 24px; + height: 24px; + display: flex; + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; } [data-theme='dark'] .header-github-link:before { - background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; } /* Warning badge styling */ .badge--warning { - --ifm-badge-background-color: #f59e0b; - --ifm-badge-border-color: #f59e0b; - color: white; + --ifm-badge-background-color: #f59e0b; + --ifm-badge-border-color: #f59e0b; + color: white; } [data-theme='dark'] .badge--warning { - --ifm-badge-background-color: #d97706; - --ifm-badge-border-color: #d97706; - color: white; + --ifm-badge-background-color: #d97706; + --ifm-badge-border-color: #d97706; + color: white; } diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index a3ec8dd..6162e8a 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -24,9 +24,21 @@ function getDayOfYear(date?: Date): number { return dayjs(date).dayOfYear(); } +const theDarkIsNotSatisfactory = ['gradientDark0', 'gradientDark1', 'gradientDark7', 'gradientDark6', 'gradientDark5', 'gradientDark4', 'gradientDark2']; + +function isNotSatisfactoryDark(name: string) { + for (let d of theDarkIsNotSatisfactory) { + if (d === name) { + return true; + } + } + return false; +} + // Select gradient class based on theme and day of year function selectGradientClass(isDarkTheme: boolean): string { - const dayOfYear = getDayOfYear(); // Uses current date by default + const currentDate = new Date(); + const dayOfYear = getDayOfYear(currentDate); // Uses current date by default if (isDarkTheme) { const index = dayOfYear % DARK_GRADIENTS_COUNT; @@ -37,6 +49,7 @@ function selectGradientClass(isDarkTheme: boolean): string { } } + function HomepageHeader() { const {siteConfig} = useDocusaurusContext(); const {colorMode} = useColorMode(); @@ -46,13 +59,15 @@ function HomepageHeader() { const gradientClass = selectGradientClass(isDarkTheme); const selectedGradientClass = styles[gradientClass]; + const headerTextClass = isNotSatisfactoryDark(gradientClass) ? 'header_hero_text' : null; + return (
- + {siteConfig.title} -

{siteConfig.tagline}

+

{siteConfig.tagline}

Date: Fri, 10 Oct 2025 14:53:49 +0800 Subject: [PATCH 4/5] feat: Add `@MustBeDocumented` to annotations --- .gitignore | 11 +- .idea/copyright/kstcp_MIT.xml | 6 + .idea/copyright/profiles_settings.xml | 7 + .idea/scopes/copyright_scope.xml | 3 + .../src/main/kotlin/GradleSupportHelper.kt | 22 +++ buildSrc/src/main/kotlin/IProject.kt | 24 ++- buildSrc/src/main/kotlin/PublishConfugure.kt | 22 +++ buildSrc/src/main/kotlin/R.kt | 22 ++- buildSrc/src/main/kotlin/SigningConfigure.kt | 22 +++ buildSrc/src/main/kotlin/Sonatype.kt | 26 +-- .../src/main/kotlin/UpdateDocsVersionTask.kt | 22 +++ .../src/main/kotlin/embeddable/Constents.kt | 22 +++ .../src/main/kotlin/embeddable/Embeddable.kt | 22 +++ .../kotlin/embeddable/EmbeddablePlugin.kt | 22 +++ .../suspend-transform.dokka-module.gradle.kts | 22 +++ ...end-transform.jvm-maven-publish.gradle.kts | 22 +++ ...suspend-transform.maven-publish.gradle.kts | 22 +++ ...orm.multiplatform-maven-publish.gradle.kts | 22 +++ ...suspend-transform.nexus-publish.gradle.kts | 22 +++ .../src/main/kotlin/utils/PropertiesUtil.kt | 22 +++ .../cli/GradlePluginCliOptions.kt | 22 +++ .../cli/KotlinCompilerPluginCliOptions.kt | 22 +++ .../cli/SuspendTransformCliOption.kt | 22 +++ .../cli/SuspendTransformCliOptions.kt | 22 +++ .../SuspendTransformConfiguration.kt | 22 +++ .../forte/plugin/suspendtrans/CliOptions.kt | 22 +++ ...DeprecatedSuspendTransformConfiguration.kt | 22 +++ .../src/main/kotlin/LocalLoggerHelper.kt | 22 +++ .../forte/plugin/suspendtrans/Constants.kt | 22 +++ .../plugin/suspendtrans/PluginAvailability.kt | 22 +++ .../SuspendTransformCommandLineProcessor.kt | 22 +++ .../SuspendTransformComponentRegistrar.kt | 22 +++ .../suspendtrans/SuspendTransformUserData.kt | 22 +++ .../plugin/suspendtrans/TransformerNames.kt | 22 +++ .../SuspendTransformFirExtensionRegistrar.kt | 22 +++ .../fir/SuspendTransformFirTransformer.kt | 22 +++ .../fir/SuspendTransformPluginKey.kt | 22 +++ .../SuspendTransformIrGenerationExtension.kt | 22 +++ .../ir/SuspendTransformTransformer.kt | 22 +++ ...tractSuspendTransformFunctionDescriptor.kt | 22 +++ .../AbstractSuspendTransformProperty.kt | 22 +++ ...impleSuspendTransformFunctionDescriptor.kt | 22 +++ ...impleSuspendTransformPropertyDescriptor.kt | 22 +++ ...spendTransformSyntheticResolveExtension.kt | 22 +++ ...stractAnnotationArgumentVoidDataVisitor.kt | 22 +++ .../utils/AnnotationDescriptorUtils.kt | 22 +++ .../suspendtrans/utils/CopyAnnotationUtils.kt | 22 +++ .../suspendtrans/utils/DescriptorUtils.kt | 22 +++ .../plugin/suspendtrans/utils/FirUtils.kt | 22 +++ .../suspendtrans/utils/IrDeclarationUtils.kt | 22 +++ .../suspendtrans/utils/IrFunctionUtils.kt | 22 +++ .../suspendtrans/utils/TransformUtil.kt | 22 +++ .../plugin/suspendtrans/utils/TypeUtils.kt | 22 +++ ...otlin.compiler.plugin.CommandLineProcessor | 22 +++ ...in.compiler.plugin.CompilerPluginRegistrar | 22 +++ .../src/main/kotlin/BuildConfig.kt | 22 +++ .../forte/plugin/suspendtrans/gradle/DSL.kt | 22 +++ .../gradle/SuspendTransformGradleExtension.kt | 22 +++ .../gradle/SuspendTransformGradlePlugin.kt | 22 +++ .../gradle/SuspendTransformPluginExtension.kt | 22 +++ .../suspendtrans/annotation/Generated.kt | 22 +++ .../annotation/SuspendTransformAnnotation.kt | 154 +++++++++++++++--- .../suspendtrans/annotation/TargetMarker.kt | 22 +++ .../SuspendTransformAnnotationJs.kt | 84 ++++++++++ .../SuspendTransformAnnotationJvm.kt | 140 ++++++++++++++-- .../suspendtrans/runtime/RunInSuspend.kt | 22 +++ .../runtime/RunInSuspendJs.kt | 24 ++- .../suspendtrans/runtime/RunInSuspendJvm.kt | 22 +++ 68 files changed, 1692 insertions(+), 63 deletions(-) create mode 100644 .idea/copyright/kstcp_MIT.xml create mode 100644 .idea/copyright/profiles_settings.xml create mode 100644 .idea/scopes/copyright_scope.xml diff --git a/.gitignore b/.gitignore index 75f6426..ef6a17a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,11 +6,12 @@ build/ !**/src/test/**/build/ ### IntelliJ IDEA ### -.idea -.idea/modules.xml -.idea/jarRepositories.xml -.idea/compiler.xml -.idea/libraries/ +.idea/** +!.idea/copyright +!.idea/copyright/** +!.idea/scopes +!.idea/scopes/** + *.iws *.iml *.ipr diff --git a/.idea/copyright/kstcp_MIT.xml b/.idea/copyright/kstcp_MIT.xml new file mode 100644 index 0000000..36cd844 --- /dev/null +++ b/.idea/copyright/kstcp_MIT.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..b295545 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/copyright_scope.xml b/.idea/scopes/copyright_scope.xml new file mode 100644 index 0000000..45bc2c7 --- /dev/null +++ b/.idea/scopes/copyright_scope.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/GradleSupportHelper.kt b/buildSrc/src/main/kotlin/GradleSupportHelper.kt index b7f3f71..c848897 100644 --- a/buildSrc/src/main/kotlin/GradleSupportHelper.kt +++ b/buildSrc/src/main/kotlin/GradleSupportHelper.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + /** * 为了让 gradle 插件可以在 buildSrc 之类的地方使用。 */ diff --git a/buildSrc/src/main/kotlin/IProject.kt b/buildSrc/src/main/kotlin/IProject.kt index 01abce6..531f338 100644 --- a/buildSrc/src/main/kotlin/IProject.kt +++ b/buildSrc/src/main/kotlin/IProject.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import IProject.IS_SNAPSHOT import love.forte.gradle.common.core.project.ProjectDetail import org.gradle.api.Project @@ -11,7 +33,7 @@ object IProject : ProjectDetail() { // Remember the libs.versions.toml! val ktVersion = "2.2.20" - val pluginVersion = "0.13.1" + val pluginVersion = "0.13.2" override val version: String = "$ktVersion-$pluginVersion" diff --git a/buildSrc/src/main/kotlin/PublishConfugure.kt b/buildSrc/src/main/kotlin/PublishConfugure.kt index d7240a8..181d6a7 100644 --- a/buildSrc/src/main/kotlin/PublishConfugure.kt +++ b/buildSrc/src/main/kotlin/PublishConfugure.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import org.gradle.api.artifacts.dsl.RepositoryHandler import org.gradle.api.publish.maven.MavenPom import utils.systemProperty diff --git a/buildSrc/src/main/kotlin/R.kt b/buildSrc/src/main/kotlin/R.kt index 8ba256f..d606feb 100644 --- a/buildSrc/src/main/kotlin/R.kt +++ b/buildSrc/src/main/kotlin/R.kt @@ -1,13 +1,23 @@ /* - * Copyright (c) 2023. ForteScarlet. + * Copyright (c) 2022-2025 Forte Scarlet * - * This file is part of simbot-component-tencent-guild. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: * - * simbot-component-tencent-guild is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. * - * simbot-component-tencent-guild is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with simbot-component-tencent-guild. If not, see . + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ import love.forte.gradle.common.core.repository.Repositories diff --git a/buildSrc/src/main/kotlin/SigningConfigure.kt b/buildSrc/src/main/kotlin/SigningConfigure.kt index 201e1f1..d30782b 100644 --- a/buildSrc/src/main/kotlin/SigningConfigure.kt +++ b/buildSrc/src/main/kotlin/SigningConfigure.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import org.gradle.api.Action import org.gradle.api.DomainObjectCollection import org.gradle.api.Project diff --git a/buildSrc/src/main/kotlin/Sonatype.kt b/buildSrc/src/main/kotlin/Sonatype.kt index 341f58d..d3a913a 100644 --- a/buildSrc/src/main/kotlin/Sonatype.kt +++ b/buildSrc/src/main/kotlin/Sonatype.kt @@ -1,17 +1,23 @@ /* - * Copyright (c) 2022 ForteScarlet + * Copyright (c) 2022-2025 Forte Scarlet * - * 本文件是 simply-robot (或称 simple-robot 3.x 、simbot 3.x ) 的一部分。 + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: * - * simply-robot 是自由软件:你可以再分发之和/或依照由自由软件基金会发布的 GNU 通用公共许可证修改之,无论是版本 3 许可证,还是(按你的决定)任何以后版都可以。 - * - * 发布 simply-robot 是希望它能有用,但是并无保障;甚至连可销售和符合某个特定的目的都不保证。请参看 GNU 通用公共许可证,了解详情。 - * - * 你应该随程序获得一份 GNU 通用公共许可证的复本。如果没有,请看: - * https://www.gnu.org/licenses - * https://www.gnu.org/licenses/gpl-3.0-standalone.html - * https://www.gnu.org/licenses/lgpl-3.0-standalone.html + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ import org.gradle.api.Project diff --git a/buildSrc/src/main/kotlin/UpdateDocsVersionTask.kt b/buildSrc/src/main/kotlin/UpdateDocsVersionTask.kt index 3fa6fc1..fa9b2f8 100644 --- a/buildSrc/src/main/kotlin/UpdateDocsVersionTask.kt +++ b/buildSrc/src/main/kotlin/UpdateDocsVersionTask.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import org.gradle.api.DefaultTask import org.gradle.api.tasks.TaskAction diff --git a/buildSrc/src/main/kotlin/embeddable/Constents.kt b/buildSrc/src/main/kotlin/embeddable/Constents.kt index 83d15ff..849be17 100644 --- a/buildSrc/src/main/kotlin/embeddable/Constents.kt +++ b/buildSrc/src/main/kotlin/embeddable/Constents.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package embeddable // constants diff --git a/buildSrc/src/main/kotlin/embeddable/Embeddable.kt b/buildSrc/src/main/kotlin/embeddable/Embeddable.kt index 383e4fa..e4a86fe 100644 --- a/buildSrc/src/main/kotlin/embeddable/Embeddable.kt +++ b/buildSrc/src/main/kotlin/embeddable/Embeddable.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + @file:Suppress("unused") package embeddable diff --git a/buildSrc/src/main/kotlin/embeddable/EmbeddablePlugin.kt b/buildSrc/src/main/kotlin/embeddable/EmbeddablePlugin.kt index 576ef5c..2191c4d 100644 --- a/buildSrc/src/main/kotlin/embeddable/EmbeddablePlugin.kt +++ b/buildSrc/src/main/kotlin/embeddable/EmbeddablePlugin.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package embeddable import org.gradle.api.Plugin diff --git a/buildSrc/src/main/kotlin/suspend-transform.dokka-module.gradle.kts b/buildSrc/src/main/kotlin/suspend-transform.dokka-module.gradle.kts index f5d5724..d5b6e1c 100644 --- a/buildSrc/src/main/kotlin/suspend-transform.dokka-module.gradle.kts +++ b/buildSrc/src/main/kotlin/suspend-transform.dokka-module.gradle.kts @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import org.jetbrains.dokka.DokkaConfiguration import java.net.URL diff --git a/buildSrc/src/main/kotlin/suspend-transform.jvm-maven-publish.gradle.kts b/buildSrc/src/main/kotlin/suspend-transform.jvm-maven-publish.gradle.kts index 4eff80b..c72c6d6 100644 --- a/buildSrc/src/main/kotlin/suspend-transform.jvm-maven-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/suspend-transform.jvm-maven-publish.gradle.kts @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import love.forte.gradle.common.core.Gpg import love.forte.gradle.common.publication.configure.configPublishMaven import love.forte.gradle.common.publication.configure.publishingExtension diff --git a/buildSrc/src/main/kotlin/suspend-transform.maven-publish.gradle.kts b/buildSrc/src/main/kotlin/suspend-transform.maven-publish.gradle.kts index bc41caa..103dc37 100644 --- a/buildSrc/src/main/kotlin/suspend-transform.maven-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/suspend-transform.maven-publish.gradle.kts @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import com.vanniktech.maven.publish.SonatypeHost import love.forte.gradle.common.core.property.ofIf diff --git a/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts b/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts index e1ff888..518d210 100644 --- a/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import love.forte.gradle.common.core.Gpg import love.forte.gradle.common.publication.configure.configPublishMaven import love.forte.gradle.common.publication.configure.publishingExtension diff --git a/buildSrc/src/main/kotlin/suspend-transform.nexus-publish.gradle.kts b/buildSrc/src/main/kotlin/suspend-transform.nexus-publish.gradle.kts index 9f118c4..44c6096 100644 --- a/buildSrc/src/main/kotlin/suspend-transform.nexus-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/suspend-transform.nexus-publish.gradle.kts @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import love.forte.gradle.common.core.repository.Repositories import love.forte.gradle.common.publication.configure.nexusPublishConfig diff --git a/buildSrc/src/main/kotlin/utils/PropertiesUtil.kt b/buildSrc/src/main/kotlin/utils/PropertiesUtil.kt index 0c9560b..65c7e59 100644 --- a/buildSrc/src/main/kotlin/utils/PropertiesUtil.kt +++ b/buildSrc/src/main/kotlin/utils/PropertiesUtil.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package utils import org.gradle.api.provider.Property diff --git a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/GradlePluginCliOptions.kt b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/GradlePluginCliOptions.kt index 4e93c2c..cc5a3c1 100644 --- a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/GradlePluginCliOptions.kt +++ b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/GradlePluginCliOptions.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.cli import kotlinx.serialization.ExperimentalSerializationApi diff --git a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/KotlinCompilerPluginCliOptions.kt b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/KotlinCompilerPluginCliOptions.kt index d9e4892..09e9bac 100644 --- a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/KotlinCompilerPluginCliOptions.kt +++ b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/KotlinCompilerPluginCliOptions.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.cli // Cli Options for Kotlin compiler plugin diff --git a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOption.kt b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOption.kt index 2b58567..a34d7bc 100644 --- a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOption.kt +++ b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOption.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.cli import org.jetbrains.kotlin.compiler.plugin.AbstractCliOption diff --git a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOptions.kt b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOptions.kt index a661d31..591e3d0 100644 --- a/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOptions.kt +++ b/compiler/suspend-transform-plugin-cli/src/main/kotlin/love/forte/plugin/suspendtrans/cli/SuspendTransformCliOptions.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.cli object SuspendTransformCliOptions { diff --git a/compiler/suspend-transform-plugin-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/configuration/SuspendTransformConfiguration.kt b/compiler/suspend-transform-plugin-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/configuration/SuspendTransformConfiguration.kt index 520e348..028a37c 100644 --- a/compiler/suspend-transform-plugin-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/configuration/SuspendTransformConfiguration.kt +++ b/compiler/suspend-transform-plugin-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/configuration/SuspendTransformConfiguration.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.configuration import kotlinx.serialization.Serializable diff --git a/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/CliOptions.kt b/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/CliOptions.kt index 6856426..e0b53ac 100644 --- a/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/CliOptions.kt +++ b/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/CliOptions.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + @file:Suppress("DEPRECATION") package love.forte.plugin.suspendtrans diff --git a/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/DeprecatedSuspendTransformConfiguration.kt b/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/DeprecatedSuspendTransformConfiguration.kt index 31905e6..5ee6276 100644 --- a/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/DeprecatedSuspendTransformConfiguration.kt +++ b/compiler/suspend-transform-plugin-deprecated-configuration/src/main/kotlin/love/forte/plugin/suspendtrans/DeprecatedSuspendTransformConfiguration.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + @file:Suppress("DEPRECATION") package love.forte.plugin.suspendtrans diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/LocalLoggerHelper.kt b/compiler/suspend-transform-plugin/src/main/kotlin/LocalLoggerHelper.kt index ae886db..276c6ae 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/LocalLoggerHelper.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/LocalLoggerHelper.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + //internal object LocalLoggerHelper { // private val dir = System.getenv("kstcp.logger.dir") // private val path = Path(dir ?: ".plugin-logger") / Path("${System.currentTimeMillis()}.log") diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/Constants.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/Constants.kt index b100aea..eaffe08 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/Constants.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/Constants.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans const val PLUGIN_REPORT_ID = "love.forte.plugin.suspendtrans.SuspendTransform" diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/PluginAvailability.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/PluginAvailability.kt index e5bc039..a9fe8e6 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/PluginAvailability.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/PluginAvailability.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans import com.intellij.psi.PsiElement diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformCommandLineProcessor.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformCommandLineProcessor.kt index a1d9212..c7ce18c 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformCommandLineProcessor.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformCommandLineProcessor.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans import BuildConfig diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformComponentRegistrar.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformComponentRegistrar.kt index 54c6d57..e2a2bd1 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformComponentRegistrar.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformComponentRegistrar.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans import love.forte.plugin.suspendtrans.configuration.InternalSuspendTransformConfigurationApi diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformUserData.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformUserData.kt index 0ac5c50..80c61f6 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformUserData.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformUserData.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans import love.forte.plugin.suspendtrans.configuration.Transformer diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/TransformerNames.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/TransformerNames.kt index 0773bcc..2e25902 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/TransformerNames.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/TransformerNames.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans import org.jetbrains.kotlin.name.CallableId diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirExtensionRegistrar.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirExtensionRegistrar.kt index 24c0efd..890ffaa 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirExtensionRegistrar.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirExtensionRegistrar.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.fir import love.forte.plugin.suspendtrans.configuration.SuspendTransformConfiguration diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt index f293a71..11481ad 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.fir import love.forte.plugin.suspendtrans.configuration.MarkAnnotation diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformPluginKey.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformPluginKey.kt index 01f8e70..918caae 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformPluginKey.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformPluginKey.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.fir import love.forte.plugin.suspendtrans.SuspendTransformBridgeFunDataFir diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformIrGenerationExtension.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformIrGenerationExtension.kt index 7aa4d4e..3989947 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformIrGenerationExtension.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformIrGenerationExtension.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.ir import love.forte.plugin.suspendtrans.PluginAvailability diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformTransformer.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformTransformer.kt index cfdd340..8d70b5a 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformTransformer.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/ir/SuspendTransformTransformer.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.ir import love.forte.plugin.suspendtrans.SuspendTransformUserDataKey diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformFunctionDescriptor.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformFunctionDescriptor.kt index 60b1e79..897252a 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformFunctionDescriptor.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformFunctionDescriptor.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.symbol import love.forte.plugin.suspendtrans.SuspendTransformUserData diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformProperty.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformProperty.kt index afd2f9c..49668c1 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformProperty.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/AbstractSuspendTransformProperty.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.symbol import love.forte.plugin.suspendtrans.SuspendTransformUserDataKey diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformFunctionDescriptor.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformFunctionDescriptor.kt index 3c6cc13..c722f4b 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformFunctionDescriptor.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformFunctionDescriptor.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.symbol import love.forte.plugin.suspendtrans.SuspendTransformUserData diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformPropertyDescriptor.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformPropertyDescriptor.kt index dfc001a..3186f19 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformPropertyDescriptor.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SimpleSuspendTransformPropertyDescriptor.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.symbol import org.jetbrains.kotlin.descriptors.ClassDescriptor diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SuspendTransformSyntheticResolveExtension.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SuspendTransformSyntheticResolveExtension.kt index b6f7bf2..15437db 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SuspendTransformSyntheticResolveExtension.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/symbol/SuspendTransformSyntheticResolveExtension.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.symbol import love.forte.plugin.suspendtrans.PluginAvailability diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AbstractAnnotationArgumentVoidDataVisitor.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AbstractAnnotationArgumentVoidDataVisitor.kt index 7c33335..0ab0dca 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AbstractAnnotationArgumentVoidDataVisitor.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AbstractAnnotationArgumentVoidDataVisitor.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import org.jetbrains.kotlin.descriptors.annotations.AnnotationArgumentVisitor diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AnnotationDescriptorUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AnnotationDescriptorUtils.kt index 79fa359..75cddbe 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AnnotationDescriptorUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/AnnotationDescriptorUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import love.forte.plugin.suspendtrans.configuration.Transformer diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/CopyAnnotationUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/CopyAnnotationUtils.kt index b04c4ff..b2202f1 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/CopyAnnotationUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/CopyAnnotationUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import love.forte.plugin.suspendtrans.configuration.IncludeAnnotation diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/DescriptorUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/DescriptorUtils.kt index 63c6167..26c1be1 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/DescriptorUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/DescriptorUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import org.jetbrains.kotlin.descriptors.CallableDescriptor diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/FirUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/FirUtils.kt index 193eea1..4c4215e 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/FirUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/FirUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import org.jetbrains.kotlin.fir.declarations.FirDeclaration diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrDeclarationUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrDeclarationUtils.kt index d99dc48..362c9a4 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrDeclarationUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrDeclarationUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrFunctionUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrFunctionUtils.kt index 052a141..a9ab602 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrFunctionUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrFunctionUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import love.forte.plugin.suspendtrans.valueParameters0 diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TransformUtil.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TransformUtil.kt index dd1b3d7..2302455 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TransformUtil.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TransformUtil.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import love.forte.plugin.suspendtrans.configuration.ClassInfo diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TypeUtils.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TypeUtils.kt index bda0f57..8326e9e 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TypeUtils.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/TypeUtils.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.utils import org.jetbrains.kotlin.descriptors.ClassDescriptor diff --git a/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor b/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor index b2bdaf6..d05fe07 100644 --- a/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor +++ b/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor @@ -1 +1,23 @@ +# +# Copyright (c) 2022-2025 Forte Scarlet +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + love.forte.plugin.suspendtrans.SuspendTransformCommandLineProcessor diff --git a/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar b/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar index 4574ac0..a2bd40f 100644 --- a/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar +++ b/compiler/suspend-transform-plugin/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar @@ -1 +1,23 @@ +# +# Copyright (c) 2022-2025 Forte Scarlet +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + love.forte.plugin.suspendtrans.SuspendTransformComponentRegistrar diff --git a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/BuildConfig.kt b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/BuildConfig.kt index c75463e..8f16e6e 100644 --- a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/BuildConfig.kt +++ b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/BuildConfig.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import love.forte.plugin.suspendtrans.gradle.SuspendTransPluginConstants @Deprecated( diff --git a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/DSL.kt b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/DSL.kt index dc718ad..626f640 100644 --- a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/DSL.kt +++ b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/DSL.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + @file:Suppress("unused", "ObjectPropertyName") package love.forte.plugin.suspendtrans.gradle diff --git a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradleExtension.kt b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradleExtension.kt index 3cd9832..50e21f4 100644 --- a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradleExtension.kt +++ b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradleExtension.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.gradle const val USE_NEW_EXTENSION = "Use the new extension " + diff --git a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradlePlugin.kt b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradlePlugin.kt index 829c4af..806e650 100644 --- a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradlePlugin.kt +++ b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradlePlugin.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.gradle import love.forte.plugin.suspendtrans.cli.SuspendTransformCliOptions diff --git a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformPluginExtension.kt b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformPluginExtension.kt index 3f02b92..aeabdb8 100644 --- a/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformPluginExtension.kt +++ b/plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformPluginExtension.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.gradle import love.forte.plugin.suspendtrans.configuration.* diff --git a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/Generated.kt b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/Generated.kt index e0ab09c..5e65101 100644 --- a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/Generated.kt +++ b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/Generated.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.annotation diff --git a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/SuspendTransformAnnotation.kt b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/SuspendTransformAnnotation.kt index 552792c..0fa105d 100644 --- a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/SuspendTransformAnnotation.kt +++ b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/SuspendTransformAnnotation.kt @@ -1,40 +1,87 @@ -package love.forte.plugin.suspendtrans.annotation +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package love.forte.plugin.suspendtrans.annotation +/** + * Marks an API that is specifically designed for Java interoperability. + * + * This annotation is used to indicate that the annotated element is part of a Java-specific API + * and should primarily be used by Java consumers rather than Kotlin code. + * + * When this annotation is applied to methods generated from suspend functions, + * it signifies that these methods were created or generated specifically to provide a Java-friendly + * alternative to Kotlin's coroutine-based APIs. + */ @RequiresOptIn(message = "Api should be used by Java", level = RequiresOptIn.Level.WARNING) @Retention(AnnotationRetention.BINARY) @OptIn(ExperimentalMultiplatform::class) @OptionalExpectation +@MustBeDocumented // since 0.13.2 public expect annotation class Api4J() - +/** + * Marks an API that is specifically designed for JavaScript interoperability. + * + * This annotation is used to indicate that the annotated element is part of a JavaScript-specific API + * and should primarily be used by JavaScript consumers rather than Kotlin code. + * + * When this annotation is applied to methods generated from suspend functions, + * it signifies that these methods were created or generated specifically to provide a JavaScript-friendly + * alternative to Kotlin's coroutine-based APIs, typically using JavaScript Promises. + */ @RequiresOptIn(message = "Api should be used by JavaScript", level = RequiresOptIn.Level.WARNING) @Retention(AnnotationRetention.BINARY) @OptIn(ExperimentalMultiplatform::class) @OptionalExpectation +@MustBeDocumented // since 0.13.2 public expect annotation class Api4Js() /** + * Generate a blocking function for Java interoperability based on the current suspend function. * + * When applied to a suspend function like: * ```kotlin * @JvmBlocking * suspend fun foo(): T = ... * ``` - * transform to: * + * It generates: * ```kotlin * @JvmSynthetic - * suspend fun foo(): T = ... + * suspend fun foo(): T = ... // Original function is hidden from Java * * @Api4J - * fun fooBlocking(): T = runInBlocking { foo() } + * fun fooBlocking(): T = runInBlocking { foo() } // New blocking function for Java * ``` * + * This annotation can be applied to both individual functions and classes + * (in which case it applies to all suspend functions in the class). */ @OptIn(ExperimentalMultiplatform::class) @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @Retention(AnnotationRetention.BINARY) @OptionalExpectation +@MustBeDocumented // since 0.13.2 public expect annotation class JvmBlocking( /** * The base name of synthetic function @@ -45,22 +92,26 @@ public expect annotation class JvmBlocking( val baseName: String = "", /** - * [baseName] 名称基础上追加的名称后缀。 + * The suffix to append to the [baseName] when generating the blocking function name. + * + * The final function name will be constructed as: [baseName] + [suffix] + * Default value is "Blocking", resulting in names like "fooBlocking". */ val suffix: String = "Blocking", /** - * 是否转化为 property 的形式: + * Specifies whether to generate a property instead of a function. + * + * When set to `true`, instead of generating a blocking function, a property will be created: * * ```kotlin * suspend fun foo(): T = ... * - * // Generated + * // Generated property (when asProperty = true) * val fooBlocking: T get() = runInBlocking { foo() } * ``` * * Note: If [asProperty] == `true`, the function cannot have parameters. - * */ val asProperty: Boolean = false, @@ -88,36 +139,58 @@ public expect annotation class JvmBlocking( ) /** + * Generate a Future-based async function for Java interoperability based on the current suspend function. + * + * When applied to a suspend function like: * ```kotlin + * @JvmAsync * suspend fun run(): Int * ``` * - * to - * + * It generates: * ```kotlin * @JvmSynthetic - * suspend fun run(): Int + * suspend fun run(): Int // Original function is hidden from Java * * @Api4J - * fun runAsync(): Future = jvmAsyncScope.future { run() } - * + * fun runAsync(): CompletableFuture = jvmAsyncScope.future { run() } // New async function for Java * ``` * + * This annotation allows Kotlin suspend functions to be exposed to Java code using a Future-based API. + * It can be applied to both individual functions and classes + * (in which case it applies to all suspend functions in the class). */ @OptIn(ExperimentalMultiplatform::class) @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @Retention(AnnotationRetention.BINARY) @OptionalExpectation +@MustBeDocumented // since 0.13.2 public expect annotation class JvmAsync( + /** + * The base name of the generated asynchronous function + * or the current function name if empty. + * + * The final function name is: [baseName] + [suffix] + */ val baseName: String = "", + + /** + * The suffix to append to the [baseName] when generating the asynchronous function name. + * + * The final function name will be constructed as: [baseName] + [suffix] + * Default value is "Async", resulting in names like "fooAsync". + */ val suffix: String = "Async", + /** - * 是否转化为 property 的形式: + * Specifies whether to generate a property instead of a function. + * + * When set to `true`, instead of generating an async function, a property will be created: * * ```kotlin * suspend fun foo(): T = ... * - * // Generated + * // Generated property (when asProperty = true) * val fooAsync: Future get() = runInAsync { foo() } * ``` * @@ -134,12 +207,12 @@ public expect annotation class JvmAsync( * For example: * * ```Kotlin - * @JvmBlocking(markName = "markName_foo") + * @JvmAsync(markName = "markName_foo") * suspend fun foo(): String = "..." * * // The generated fun: * @JvmName(name = "markName_foo") - * fun fooBlocking(): String = runBlocking { foo() } + * fun fooAsync(): Future = jvmAsyncScope.future { foo() } * ``` * * Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler. @@ -149,25 +222,61 @@ public expect annotation class JvmAsync( ) +/** + * Generate a Promise-based variant function for Java interoperability based on the current suspend function. + * + * When applied to a suspend function like: + * ```kotlin + * @JsPromise + * suspend fun run(): String + * ``` + * + * It generates: + * ```kotlin + * @JvmSynthetic + * suspend fun run(): String // Original suspend function + * + * @Api4Js + * fun runAsync(): Promise = runAsync { run() } // New Promise-based function for JavaScript + * ``` + * + * This annotation allows Kotlin suspend functions to be exposed to JavaScript code using JavaScript Promises. + * It can be applied to both individual functions and classes (in which case it applies to all suspend functions in the class). + */ @OptIn(ExperimentalMultiplatform::class) @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @Retention(AnnotationRetention.BINARY) @OptionalExpectation +@MustBeDocumented // since 0.13.2 public expect annotation class JsPromise( + /** + * The base name of the generated Promise-based function + * or the current function name if empty. + * + * The final function name is: [baseName] + [suffix] + */ val baseName: String = "", + + /** + * The suffix to append to the [baseName] when generating the Promise-based function name. + * + * The final function name will be constructed as: [baseName] + [suffix] + * Default value is "Async", resulting in names like "fooAsync". + */ val suffix: String = "Async", /** - * 是否转化为 property 的形式: + * Specifies whether to generate a property instead of a function. + * + * When set to `true`, instead of generating a Promise-based function, a property will be created: * * ```kotlin * suspend fun foo(): T = ... * - * // Generated + * // Generated property (when asProperty = true) * val fooAsync: Promise get() = runInAsync { foo() } * ``` * * Note: If [asProperty] == `true`, the function cannot have parameters. - * */ val asProperty: Boolean = false, @@ -188,7 +297,8 @@ public expect annotation class JsPromise( * fun fooAsync(): Promise = runAsync { foo() } * ``` * - * + * This helps control the JavaScript function name when using the Kotlin/JS compiler. + * * @since 0.13.0 */ val markName: String = "", diff --git a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt index 37648d5..e8f82ae 100644 --- a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt +++ b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.annotation /** diff --git a/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt b/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt index 705b7de..d685442 100644 --- a/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt +++ b/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt @@ -1,18 +1,101 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.annotation +/** + * Marks an API that is specifically designed for JavaScript interoperability. + * + * This annotation is used to indicate that the annotated element is part of a JavaScript-specific API + * and should primarily be used by JavaScript consumers rather than Kotlin code. + * + * When this annotation is applied to methods generated from suspend functions, + * it signifies that these methods were created or generated specifically to provide a JavaScript-friendly + * alternative to Kotlin's coroutine-based APIs, typically using JavaScript Promises. + */ @RequiresOptIn(message = "Api should be used by JavaScript", level = RequiresOptIn.Level.WARNING) @Retention(AnnotationRetention.BINARY) +@MustBeDocumented public actual annotation class Api4Js @RequiresOptIn(message = "Experimental javascript api", level = RequiresOptIn.Level.WARNING) @Retention(AnnotationRetention.BINARY) public annotation class ExperimentalJsApi +/** + * Generate a Promise-based variant function for Java interoperability based on the current suspend function. + * + * When applied to a suspend function like: + * ```kotlin + * @JsPromise + * suspend fun run(): String + * ``` + * + * It generates: + * ```kotlin + * @JvmSynthetic + * suspend fun run(): String // Original suspend function + * + * @Api4Js + * fun runAsync(): Promise = runAsync { run() } // New Promise-based function for JavaScript + * ``` + * + * This annotation allows Kotlin suspend functions to be exposed to JavaScript code using JavaScript Promises. + * It can be applied to both individual functions and classes (in which case it applies to all suspend functions in the class). + */ @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @Retention(AnnotationRetention.BINARY) +@MustBeDocumented // since 0.13.2 public actual annotation class JsPromise( + /** + * The base name of the generated Promise-based function + * or the current function name if empty. + * + * The final function name is: [baseName] + [suffix] + */ actual val baseName: String, + + /** + * The suffix to append to the [baseName] when generating the Promise-based function name. + * + * The final function name will be constructed as: [baseName] + [suffix] + * Default value is "Async", resulting in names like "fooAsync". + */ actual val suffix: String, + + /** + * Specifies whether to generate a property instead of a function. + * + * When set to `true`, instead of generating a Promise-based function, a property will be created: + * + * ```kotlin + * suspend fun foo(): T = ... + * + * // Generated property (when asProperty = true) + * val fooAsync: Promise get() = runInAsync { foo() } + * ``` + * + * Note: If [asProperty] == `true`, the function cannot have parameters. + */ actual val asProperty: Boolean, /** @@ -32,6 +115,7 @@ public actual annotation class JsPromise( * fun fooAsync(): Promise = runAsync { foo() } * ``` * + * This helps control the JavaScript function name when using the Kotlin/JS compiler. * * @since 0.13.0 */ diff --git a/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt b/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt index 3d7ed24..6396509 100644 --- a/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt +++ b/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt @@ -1,8 +1,41 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.annotation +/** + * Marks an API that is specifically designed for Java interoperability. + * + * This annotation is used to indicate that the annotated element is part of a Java-specific API + * and should primarily be used by Java consumers rather than Kotlin code. + * + * When this annotation is applied to methods generated from suspend functions, + * it signifies that these methods were created or generated specifically to provide a Java-friendly + * alternative to Kotlin's coroutine-based APIs. + */ @RequiresOptIn(message = "Api should be used by Java", level = RequiresOptIn.Level.WARNING) @Retention(AnnotationRetention.BINARY) +@MustBeDocumented // since 0.13.2 public actual annotation class Api4J @@ -11,48 +44,59 @@ public actual annotation class Api4J public annotation class ExperimentalJvmApi /** + * Generate a blocking function for Java interoperability based on the current suspend function. * + * When applied to a suspend function like: * ```kotlin * @JvmBlocking * suspend fun foo(): T = ... * ``` - * transform to: * + * It generates: * ```kotlin * @JvmSynthetic - * suspend fun foo(): T = ... + * suspend fun foo(): T = ... // Original function is hidden from Java * * @Api4J - * fun fooBlocking(): T = runInBlocking { foo() } + * fun fooBlocking(): T = runInBlocking { foo() } // New blocking function for Java * ``` * + * This annotation can be applied to both individual functions and classes + * (in which case it applies to all suspend functions in the class). */ @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @Retention(AnnotationRetention.BINARY) +@MustBeDocumented // since 0.13.2 public actual annotation class JvmBlocking( /** - * 生成函数的基础名称,如果为空则为当前函数名。 - * 最终生成的函数名为 [baseName] + [suffix]。 + * The base name of synthetic function + * or the current function name if empty. + * + * The final function name is: [baseName] + [suffix] */ actual val baseName: String, - + /** - * [baseName] 名称基础上追加的名称后缀。 + * The suffix to append to the [baseName] when generating the blocking function name. + * + * The final function name will be constructed as: [baseName] + [suffix] + * Default value is "Blocking", resulting in names like "fooBlocking". */ actual val suffix: String, - + /** - * 是否转化为 property 的形式: + * Specifies whether to generate a property instead of a function. + * + * When set to `true`, instead of generating a blocking function, a property will be created: * * ```kotlin * suspend fun foo(): T = ... * - * // Generated + * // Generated property (when asProperty = true) * val fooBlocking: T get() = runInBlocking { foo() } * ``` * - * 只有函数没有参数时有效。 - * + * Note: If [asProperty] == `true`, the function cannot have parameters. */ actual val asProperty: Boolean, @@ -60,6 +104,19 @@ public actual annotation class JvmBlocking( * The name of `@JvmName`. * Valid when not empty. * + * If [markName] is valid, [kotlin.jvm.JvmName] will be annotated on the generated function. + * + * For example: + * + * ```Kotlin + * @JvmBlocking(markName = "markName_foo") + * suspend fun foo(): String = "..." + * + * // The generated fun: + * @JvmName(name = "markName_foo") + * fun fooBlocking(): String = runBlocking { foo() } + * ``` + * * Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler. * @since 0.13.0 */ @@ -67,33 +124,80 @@ public actual annotation class JvmBlocking( ) /** + * Generate a Future-based async function for Java interoperability based on the current suspend function. + * + * When applied to a suspend function like: * ```kotlin + * @JvmAsync * suspend fun run(): Int * ``` * - * to - * + * It generates: * ```kotlin * @JvmSynthetic - * suspend fun run(): Int + * suspend fun run(): Int // Original function is hidden from Java * * @Api4J - * fun runAsync(): Future = jvmAsyncScope.future { run() } - * + * fun runAsync(): CompletableFuture = jvmAsyncScope.future { run() } // New async function for Java * ``` * + * This annotation allows Kotlin suspend functions to be exposed to Java code using a Future-based API. + * It can be applied to both individual functions and classes + * (in which case it applies to all suspend functions in the class). */ @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @Retention(AnnotationRetention.BINARY) +@MustBeDocumented // since 0.13.2 public actual annotation class JvmAsync( + /** + * The base name of the generated asynchronous function + * or the current function name if empty. + * + * The final function name is: [baseName] + [suffix] + */ actual val baseName: String, + + /** + * The suffix to append to the [baseName] when generating the asynchronous function name. + * + * The final function name will be constructed as: [baseName] + [suffix] + * Default value is "Async", resulting in names like "fooAsync". + */ actual val suffix: String, + + /** + * Specifies whether to generate a property instead of a function. + * + * When set to `true`, instead of generating an async function, a property will be created: + * + * ```kotlin + * suspend fun foo(): T = ... + * + * // Generated property (when asProperty = true) + * val fooAsync: Future get() = runInAsync { foo() } + * ``` + * + * Note: If [asProperty] == `true`, the function cannot have parameters. + */ actual val asProperty: Boolean, /** - * The name of `@JvmName`. + * The name of [@JvmName][kotlin.jvm.JvmName]. * Valid when not empty. * + * If [markName] is valid, [@JvmName][kotlin.jvm.JvmName] will be annotated on the generated function. + * + * For example: + * + * ```Kotlin + * @JvmAsync(markName = "markName_foo") + * suspend fun foo(): String = "..." + * + * // The generated fun: + * @JvmName(name = "markName_foo") + * fun fooAsync(): Future = jvmAsyncScope.future { foo() } + * ``` + * * Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler. * @since 0.13.0 */ diff --git a/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt b/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt index 63cc84d..b2f936a 100644 --- a/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt +++ b/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.runtime /* diff --git a/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt b/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt index 37415c9..5e9cdf9 100644 --- a/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt +++ b/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt @@ -1,11 +1,33 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package love.forte.plugin.suspendtrans.runtime import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.promise import kotlin.coroutines.CoroutineContext import kotlin.js.Promise -import kotlinx.coroutines.SupervisorJob private val CoroutineContext4Js: CoroutineContext = Dispatchers.Default + SupervisorJob() diff --git a/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt b/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt index 0f5f5d7..1a5b313 100644 --- a/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt +++ b/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2022-2025 Forte Scarlet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + @file:JvmName("RunInSuspendJvmKt") package love.forte.plugin.suspendtrans.runtime From 5d72ab2fa4d80a112e883499ec1823ac5ef3ee77 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Fri, 10 Oct 2025 16:02:26 +0800 Subject: [PATCH 5/5] release: v2.2.20-0.13.2 --- .changelog/v2.2.20-0.13.2.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .changelog/v2.2.20-0.13.2.md diff --git a/.changelog/v2.2.20-0.13.2.md b/.changelog/v2.2.20-0.13.2.md new file mode 100644 index 0000000..bd6972a --- /dev/null +++ b/.changelog/v2.2.20-0.13.2.md @@ -0,0 +1 @@ +Kotlin version: `v2.2.20` \ No newline at end of file