Skip to content

Commit 18057ed

Browse files
authored
Merge branch 'zlataovce:master' into master
2 parents 82cf297 + aa6985d commit 18057ed

File tree

138 files changed

+372
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+372
-213
lines changed

build-logic/src/main/kotlin/takenaka.base-conventions.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ java {
2121
}
2222

2323
license {
24-
skipExistingHeaders(true)
2524
header(rootProject.file("license_header.txt"))
2625

27-
exclude("**/BuildConfig.kt") // generated file
2826
exclude("**/*.properties") // detection is not very good, doesn't need a license anyway
2927
}
3028

build.gradle.kts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ plugins {
55

66
allprojects {
77
group = "me.kcra.takenaka"
8-
version = "1.1.1"
8+
version = "1.1.2"
9+
description = "A Kotlin library for reconciling multiple obfuscation mapping files from multiple versions of Minecraft: JE."
910
}

core/src/benchmark/kotlin/me/kcra/takenaka/core/benchmark/mapping/analysis/impl/MappingAnalyzerImplBenchmark.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/VersionManifest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/Workspace.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ElementRemapper.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/MappingContributor.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/MappingTreeBuilder.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/CraftBukkitNMSVersionCompleter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/LegacySpigotMappingPrepender.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/MethodArgSourceFilter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/MissingDescriptorFilter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/NamespaceFilter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/ObjectOverrideFilter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/adapter/StaticInitializerFilter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/MappingAnalyzer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/Problem.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/ProblemKind.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/impl/AbstractMappingAnalyzer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/impl/AnalysisOptions.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/impl/ClassAnalysisContext.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/impl/InheritanceWalkMode.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/impl/MappingAnalyzerImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/analysis/impl/StandardProblemKinds.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/AncestryTree.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/AncestryTreeBuilder.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/ConstructorComputationMode.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/NamespacedMapping.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/ResolvedNamespace.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/impl/builtinElements.kt

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
@@ -104,8 +104,21 @@ fun <T : MappingTreeView, C : MappingTreeView.ClassMappingView> classAncestryTre
104104
}
105105
}
106106

107+
val srcName = klass.srcName
108+
val srcNameParts = srcName.split('$')
109+
.filterNotTo(mutableSetOf()) { part -> part.all(Char::isDigit) } // no anonymous parts
110+
111+
val isInner = srcNameParts.size > 1
107112
val classMappings = treeAllowedNamespaces.mapNotNullTo(HashSet(treeAllowedNamespaces.size)) { (ns, id) ->
108-
klass.getDstName(id)?.let { name -> NamespacedMapping(ns, name) }
113+
klass.getDstName(id)?.let { name ->
114+
if (isInner && name != srcName) { // inner and not unobfuscated
115+
if (name.split('$').any(srcNameParts::contains)) {
116+
return@let null // mapping not suitable for history - contains an obfuscated inner name
117+
}
118+
}
119+
120+
NamespacedMapping(ns, name)
121+
}
109122
}
110123
val classMappingsArray = classMappings.toTypedArray() // perf: use array due to marginally better iteration performance
111124

core/src/main/kotlin/me/kcra/takenaka/core/mapping/ancestry/impl/treeIndex.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/mappingCollections.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/matchers/methodMatchers.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/LicenseResolver.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/MappingResolver.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/Output.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/OutputContainer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/impl/IntermediaryMappingResolver.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/impl/MojangManifestAttributeProvider.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/impl/MojangMappingResolver.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

core/src/main/kotlin/me/kcra/takenaka/core/mapping/resolve/impl/SeargeMappingResolver.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of takenaka, licensed under the Apache License, Version 2.0 (the "License").
33
*
4-
* Copyright (c) 2023 Matous Kucera
4+
* Copyright (c) 2023-2024 Matous Kucera
55
*
66
* You may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

0 commit comments

Comments
 (0)