Minted, setstretch and font size

\setminted{fontsize=\small,baselinestretch=1}

Enjoy


You could insert the following code in your document's preamble, after loading the minted package:

\usepackage{etoolbox}
\AtBeginEnvironment{minted}{\singlespacing%
    \fontsize{10}{10}\selectfont}

Alternatively, you could start each minted environment with the following options: baselinestretch=1 and fontsize=\footnotesize. The latter works because if you set the main font size to be 12pt, then \footnotesize will switch to a font size that's 2pt smaller; if you want your code to be typeset in 11pt (and the main font size is still 12pt), you should use the command \small instead of \footnotesize.


A bit late to the party, but defining an environment such as

\newminted{java}{fontsize=\footnotesize}

works too. Then all

\begin{javacode}...\end{javacode} 

will have font size set to footnotesize.