Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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>
@centic9

This comment has been minimized.

Copy link

@centic9 centic9 commented Sep 27, 2012

FYI, this can be installed via "View -> User defined dialog -> Import"

@ericfrancis

This comment has been minimized.

Copy link

@ericfrancis ericfrancis commented Oct 17, 2013

@centic9, I do not see the option you are referring to. I see "Language -> User-Define"
I did that and then imported "gradle.xml" (what I named this file. I am not seeing syntax highlighting. Any idea?

@oleksandr-kozlov

This comment has been minimized.

Copy link

@oleksandr-kozlov oleksandr-kozlov commented Nov 22, 2013

nice, thanks :)
btw, sourceCompatibility is misspelled

@mahadevshindhe

This comment has been minimized.

Copy link

@mahadevshindhe mahadevshindhe commented May 30, 2014

Thank you

@gavinyu1988

This comment has been minimized.

Copy link

@gavinyu1988 gavinyu1988 commented Aug 19, 2014

great, thanks!

@JensThanx

This comment has been minimized.

Copy link

@JensThanx JensThanx commented Aug 24, 2014

Thanks, it is a great help. In Np5.9, after importing the file I had to save it again. Only then it became visible in the "Languages" and the visible changes took place.

@juliocvergarah

This comment has been minimized.

Copy link

@juliocvergarah juliocvergarah commented Apr 21, 2015

Maybe you can try to put an entry for this gradle definition at http://docs.notepad-plus-plus.org/index.php?title=User_Defined_Language_Files

@estani

This comment has been minimized.

Copy link

@estani estani commented Feb 19, 2016

FYI you may copy the url returned by raw directly in the file browser opened after clicking on "import..."

@realsonic

This comment has been minimized.

Copy link

@realsonic realsonic commented May 17, 2016

Cheers!

@ManfredSchenkIOSB

This comment has been minimized.

Copy link

@ManfredSchenkIOSB ManfredSchenkIOSB commented Jul 8, 2016

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

@vjykumar

This comment has been minimized.

Copy link

@vjykumar vjykumar commented Sep 1, 2016

Thanks a ton

@faridfor

This comment has been minimized.

Copy link

@faridfor faridfor commented Dec 7, 2016

thanks!

@matthung0807

This comment has been minimized.

Copy link

@matthung0807 matthung0807 commented Dec 16, 2016

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

@ghost

This comment has been minimized.

@Subfire

This comment has been minimized.

Copy link

@Subfire Subfire commented Nov 18, 2017

good

@Drjacky

This comment has been minimized.

Copy link

@Drjacky Drjacky commented Apr 26, 2018

Fail to import!

Notepad++ v 7.5.6 32 bit

@rudisills

This comment has been minimized.

Copy link

@rudisills 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.

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