Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Aug 29, 2022
0 parents commit 6fa80f0
Show file tree
Hide file tree
Showing 26 changed files with 798 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.idea/
.idea_modules/
*.iml
*.ipr
*.iws

/out/
/build/
/.sandbox/

*.log

.gradle/
20 changes: 20 additions & 0 deletions HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
${name}
Copyright (C) ${year} ${holder}

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.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Matyrobbrt

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.
13 changes: 13 additions & 0 deletions Testing/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
plugins {
id 'groovy'
}
repositories {
mavenCentral()
flatDir {
dir "$projectDir/../build/libs"
}
}
dependencies {
implementation 'org.apache.groovy:groovy:4.0.4'
compileOnly 'nll:EnhancedGroovy:0.1.0:test'
}
Binary file added Testing/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions Testing/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Empty file added Testing/settings.gradle
Empty file.
16 changes: 16 additions & 0 deletions Testing/src/main/groovy/TestingThing.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import yes.MyTestAnnotations

@MyTestAnnotations
class TestingThing {
static {
println helloThere
println helloThere
println yep.get()
}
TestingThing() {
println helloThere
if (helloThere > 12) {

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
transformer.addField('yes', 'java.lang.String')
87 changes: 87 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id 'java'
id 'groovy'
id 'idea'
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}"
id 'org.jetbrains.intellij' version '1.6.0'
id 'org.cadixdev.licenser' version '0.6.1'
}

group = pluginGroup
version = pluginVersion

java.toolchain.languageVersion = JavaLanguageVersion.of(11)

repositories {
mavenCentral()
maven {
name = 'IntelliJ Dependencies'
url = 'https://cache-redirector.jetbrains.com/intellij-dependencies'
}
}

sourceSets {
dsl
test
}

dependencies {
dslImplementation "org.apache.groovy:groovy:${groovyVersion}"
testImplementation "org.apache.groovy:groovy:${groovyVersion}"
testCompileOnly sourceSets.dsl.output

implementation "org.ow2.asm:asm:${asmVersion}"
implementation "org.ow2.asm:asm-tree:${asmVersion}"
implementation "org.ow2.asm:asm-analysis:${asmVersion}"
implementation "org.apache.groovy:groovy:${groovyVersion}"

compileOnly sourceSets.dsl.output
}

tasks.create('testJar', Jar) {
group 'build'
from sourceSets.test.output
classifier 'test'
}

intellij {
pluginName = project.properties.pluginName
type = platformType
version = platformVersion

downloadSources = true
updateSinceUntilBuild = false
plugins = ['java', 'gradle', 'Groovy', 'ByteCodeViewer']
sandboxDir = layout.projectDirectory.dir('.sandbox').toString()
}

tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = '11'
freeCompilerArgs = ['-Xjvm-default=all']
}
}

compileGroovy {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(8)
})
}

jar {
from sourceSets.dsl.output
}

license {
header = file('HEADER')
ext {
name = 'EnhancedGroovy'
year = 2022
holder = 'Matyrobbrt'
}
exclude '**/bytecode-utils.kt', '**/class-utils.kt', '**/MemberReference.kt', '**/psi-utils.kt', '**/gradle-util.kt'
}

idea.module.excludeDirs.add(project.file(intellij.sandboxDir.get()))
14 changes: 14 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# IntelliJ Platform Artifacts Repositories
# -> https://www.jetbrains.org/intellij/sdk/docs/reference_guide/intellij_artifacts.html

pluginGroup=com.matyrobbrt.enhancedgroovy
pluginName=EnhancedGroovy
pluginVersion=0.1.0

platformType=IC
platformVersion=2021.2

# Dependencies
kotlinVersion=1.6.20
asmVersion=9.3
groovyVersion=4.0.4
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 6fa80f0

Please sign in to comment.