Skip to content

Commit 918f380

Browse files
authored
Update atplug towards Kotlin (#8)
2 parents 9c22297 + 1505351 commit 918f380

File tree

14 files changed

+404
-431
lines changed

14 files changed

+404
-431
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# AtPlug releases
22

33
## [Unreleased]
4+
### Added
5+
- Add methods for taking `KClass` instead of just `Class` to prepare for Kotlin Multiplatform. ([#8](https://github.com/diffplug/atplug/pull/8))
46

57
## [1.0.1] - 2022-12-31
68
### Fixed

atplug-plugin-gradle/src/main/java/com/diffplug/atplug/tooling/PlugGeneratorJavaExecable.java

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (C) 2022 DiffPlug
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.diffplug.atplug.tooling
17+
18+
import com.diffplug.atplug.tooling.gradle.JavaExecable
19+
import java.io.File
20+
import java.util.*
21+
22+
/** [PlugGenerator.PlugGenerator] in a [JavaExecable] form. */
23+
class PlugGeneratorJavaExecable(toSearch: List<File>?, toLinkAgainst: Set<File>?) : JavaExecable {
24+
// inputs
25+
var toSearch: List<File>
26+
var toLinkAgainst: Set<File>
27+
28+
// outputs
29+
@JvmField var atplugInf: SortedMap<String, String>? = null
30+
31+
init {
32+
this.toSearch = ArrayList(toSearch)
33+
this.toLinkAgainst = LinkedHashSet(toLinkAgainst)
34+
}
35+
36+
override fun run() {
37+
val metadataGen = PlugGenerator(toSearch, toLinkAgainst)
38+
atplugInf = metadataGen.atplugInf
39+
}
40+
}

atplug-plugin-gradle/src/main/java/com/diffplug/atplug/tooling/gradle/PlugGenerateTask.java

Lines changed: 0 additions & 236 deletions
This file was deleted.

0 commit comments

Comments
 (0)