-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
189 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import nu.studer.gradle.credentials.CredentialsPlugin | ||
import nu.studer.gradle.credentials.domain.CredentialsContainer | ||
import org.jetbrains.intellij.tasks.PublishTask | ||
import org.jetbrains.kotlin.gradle.dsl.Coroutines | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
} | ||
|
||
plugins { | ||
kotlin("jvm") version("1.1.60") | ||
id("org.jetbrains.intellij") version("0.2.17") | ||
id("nu.studer.credentials") version("1.0.3") | ||
id("org.jmailen.kotlinter") version("1.5.0") | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
compileOnly(kotlin("stdlib-jre8")) | ||
compileOnly(kotlin("reflect")) | ||
} | ||
|
||
val publishPlugin: PublishTask by tasks | ||
val credentials: CredentialsContainer by extra | ||
val javaVersion = "1.8" | ||
|
||
intellij { | ||
version = "2016.1" | ||
updateSinceUntilBuild = false | ||
} | ||
|
||
java { | ||
setSourceCompatibility(javaVersion) | ||
setTargetCompatibility(javaVersion) | ||
} | ||
|
||
kotlin { | ||
experimental.coroutines = Coroutines.ENABLE | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = javaVersion | ||
} | ||
|
||
publishPlugin { | ||
username(credentials["JETBRAINS_USERNAME"]) | ||
password(credentials["JETBRAINS_PASSWORD"]) | ||
} | ||
|
||
apply { | ||
from("gradle/hooks.gradle.kts") | ||
} | ||
|
||
group = "net.olegg" | ||
version = "0.0.4" | ||
|
||
inline operator fun <T : Task> T.invoke(a: T.() -> Unit): T = apply(a) | ||
operator fun CredentialsContainer.get(key: String) = this.getProperty(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
val installHook = task<Copy>("installHook") { | ||
from(File(rootProject.rootDir, "pre-commit")) | ||
into(File(rootProject.rootDir, ".git/hooks").also { it.setExecutable(true) }) | ||
} | ||
|
||
tasks { | ||
"build" { | ||
dependsOn(installHook) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Mon Feb 20 21:13:56 PST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# script to run tests on what is to be committed | ||
|
||
# First, stash index and work dir, keeping only the | ||
# to-be-committed changes in the working directory. | ||
old_stash=$(git rev-parse -q --verify refs/stash) | ||
git stash save -q --keep-index | ||
new_stash=$(git rev-parse -q --verify refs/stash) | ||
|
||
# If there were no changes (e.g., `--amend` or `--allow-empty`) | ||
# then nothing was stashed, and we should skip everything, | ||
# including the tests themselves. (Presumably the tests passed | ||
# on the previous commit, so there is no need to re-run them.) | ||
if [ "$old_stash" = "$new_stash" ]; then | ||
echo "pre-commit script: no changes to test" | ||
sleep 1 # XXX hack, editor may erase message | ||
exit 0 | ||
fi | ||
|
||
# Run tests | ||
./gradlew formatKotlin lintKotlin --daemon | ||
status=$? | ||
|
||
# Restore changes | ||
git reset --hard -q && git stash apply --index -q && git stash drop -q | ||
|
||
# Exit with status from test-run: nonzero prevents commit | ||
exit $status |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gradle.rootProject { | ||
setProperty("name", "lottie-idea") | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.olegg.lottie.idea | ||
|
||
/** | ||
* Helper class to store constants. | ||
*/ | ||
object Constants { | ||
val ACTION_GROUP = "lottie-idea.ActionGroup" | ||
val TOOL_WINDOW_ID = "lottie-idea" | ||
} |
4 changes: 2 additions & 2 deletions
4
...main/kotlin/net/olegg/bodylookin/Icons.kt → ...ain/kotlin/net/olegg/lottie/idea/Icons.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../net/olegg/bodylookin/BodylookinPlugin.kt → ...net/olegg/lottie/idea/LottieIdeaPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.