Mindy Kaling is slipping into “Good in Bed,” a feature film adaptation of the Jennifer Weiner novel, for HBO Max.

Kaling will produce and star in the film based on the title, which spent five years on the New York Times bestseller list and has sold over 11 million copies.

The “Ocean’s 8” star will produce under her Kaling International banner with Jessica Kumai Scott. Howard Klein of 3Arts, and Jake Weiner and Chris Bender of Good Fear Content will also serve as producers. Screenwriter Liz Sarnoff is adapting the script.

“Good in Bed” tells of an up-and-coming journalist in Philadelphia grappling with shaky self-esteem, a fresh-out-of-the-closet mom, an absent father and the guy who broke her heart. In the course of one eventful year, with the help of a fairy godmother best friend (also a movie star), the protagonist weathers public humiliation, finds true love and learns to accept herself, and her life, in all of its messy, imperfect glory.

Upcoming projects for Kaling International include the second season of “Never Have I Ever” for Netflix, “Sex Lives of College Girls” for HBO Max, “Expecting” for Peacock and an untitled wedding comedy with Priyanka Chopra at Universal.

Kaling is represented by CAA, 3Arts, The Lede Company and ZiffrenLaw. Weiner is repped by CAA in film and television, Joanna Pulcini Literary Management for publishing, Good Fear Management and attorney Joe Weiner of Miloknay Weiner LLP.