Rambam, Laws of Prohibited Intercourse 1:14
הבא על הזכר או הביא זכר עליו כיון שהערה אם היו שניהם גדולים נסקלים שנאמר ואת זכר לא תשכב בין שהיה בועל או נבעל, ואם היה קטן בן ט' שנים ויום אחד ומעלה זה שבא עליו או הביאו על עצמו נסקל והקטן פטור, ואם היה הזכר בן ט' או פחות שניהן פטורין וראוי לבית דין להכות הגדול מכת מרדות לפי ששכב עם זכר ואע"פ שהוא פחות מבן ט'
One who penetrates a man or is penetrated by a man, if they are both adults, they are stoned, since it says “With a man you shall not lie,” whether you penetrate or are penetrated. If one was a minor, aged nine and one day or older, the adult who penetrates or is penetrated by the minor is stoned, but the minor is exempt [from punishment]. If the minor is [exactly] nine years old or younger, they are both exempt [from stoning]. However, it is fitting for the Beit Din to punish the adult with lashes, because he lay with a male, even though the male was younger than nine. [Translation by Rabbi Steve Greenberg]
Time Period: Medieval (Geonim through the 16th Century)