Skip to content

Instantly share code, notes, and snippets.

@toddb
Created June 4, 2012 20:26
Show Gist options
  • Save toddb/2870655 to your computer and use it in GitHub Desktop.
Save toddb/2870655 to your computer and use it in GitHub Desktop.
Gradle language for Notepad++
<NotepadPlus>
<UserLang name="Gradle" ext="gradle">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="yes" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;&apos;0&quot;&apos;0</Keywords>
<Keywords name="Folder+"></Keywords>
<Keywords name="Folder-"></Keywords>
<!-- sequences not supported for operators ... so don't bother -->
<Keywords name="Operators"></Keywords>
<Keywords name="Comment">1/* 2*/ 0//</Keywords>
<!-- java keywords and literals -->
<Keywords name="Words1">task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets</Keywords>
<!-- build script blocks -->
<Keywords name="Words2">description delete from into include exclude source classpath destinationDir includes options souceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true</Keywords>
<!-- types -->
<Keywords name="Words3">antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void</Keywords>
<!-- Groovy JDK stuff -->
<Keywords name="Words4">compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="808040" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="808040" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="006699" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="NUMBER" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="DELIMITER1" styleID="14" fgColor="DB599D" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMITER2" styleID="15" fgColor="DB599D" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="REGEX" styleID="52" fgColor="8000FF" bgColor="F2F4FF" fontName="" fontStyle="0" fontSize="" />
</Styles>
</UserLang>
</NotepadPlus>
@ManfredSchenkIOSB
Copy link

This language definition does not know the 'compileOnly' configuration which is available in newer gradle releases.

@vjykumar
Copy link

vjykumar commented Sep 1, 2016

Thanks a ton

@faridfor
Copy link

faridfor commented Dec 7, 2016

thanks!

@matthung0807
Copy link

Thanks!
How to import
NotePad++ > Tool bar > Language > Define your language... > Import > Save as...

@Subfire
Copy link

Subfire commented Nov 18, 2017

good

@Drjacky
Copy link

Drjacky commented Apr 26, 2018

Fail to import!

Notepad++ v 7.5.6 32 bit

@rudisills
Copy link

rudisills commented May 4, 2018

Could you add support to make /* */ comment fields collapsible?

I found how to configure it.

Language -> Define your Language...

Select Gradle from the "User language" dropdown (after it has already been imported into np++).
Select "Comment & Number" tab.
Check "Allow folding of comments"
Close "User Defined Language" window.

@GilianMarques
Copy link

GilianMarques commented Jul 31, 2022

Thats how you import this file
https://stackoverflow.com/a/47573762/7953908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment