
275 S.W.3d 9 (2008)
CONTINENTAL HOMES OF TEXAS, L.P., Appellant,
v.
CITY OF SAN ANTONIO, Appellee.
No. 04-07-00038-CV.
Court of Appeals of Texas, San Antonio.
April 16, 2008.
Rehearing Overruled August 20, 2008.
*11 John McClish, Sue Wall, Womack, McClish, Wall & Foster, P.C., Austin, TX, Robert B. Gilbreath, Hawkins, Parnell & Thackston, L.L.P., Dallas, TX, for Appellant.
Sharon E. Callaway, Michael J. Murray, Crofts & Callaway, P.C., San Antonio, TX, Kenneth L. Clark, Sr., Assistant City Attorney, Litigation Division, San Antonio, TX, for Appellee.
Sitting: ALMA L. LÓPEZ, Chief Justice, PHYLIS J. SPEEDLIN, Justice, STEVEN C. HILBIG, Justice.

OPINION
Opinion by PHYLIS J. SPEEDLIN, Justice.
Continental Homes of Texas, L.P. ("Continental") appeals the trial court's judgment granting a permanent injunction enjoining it from removing any trees from a tract of land under development (the "Kallison Ranch Project") without first obtaining a permit under the City of San Antonio's tree preservation ordinance, and ordering it to replant specified quantities of trees in mitigation of the trees removed; the court declined Continental's request for a declaratory judgment recognizing its vested rights for the project. We reverse the trial court's judgment and dissolve the *12 injunction, and render judgment recognizing Continental's vested rights and awarding it attorney's fees.

FACTUAL & PROCEDURAL BACKGROUND
In August 1991, the Kallison Ranch landowners entered into a written agreement with Grey Forest Utilities to provide natural gas service to the development in exchange for the utility's acquisition of a tract of land for placement of a gas metering station. Based on the Grey Forest utility service agreement, the City of San Antonio granted an application for a vested rights permit for the Kallison Ranch Project on March 15, 2002 (the "Vested Rights Permit"). The Vested Rights Permit states that it is effective "as of August 29,1991," and does not state any conditions to its continuation or any expiration date.
In February 2005, Pape-Dawson Engineers, acting on behalf of the then owners of the property, submitted a Master Development Plan ("MDP # 838") to the City of San Antonio for the development of the Kallison Ranch Project. Pape-Dawson supplemented the MDP with a Master Tree Stand Delineation. In August 2005, the City approved the Master Development Plan, but rejected the proposed Master Tree Stand Delineation, stating in a separate letter to Pape-Dawson that, "this project will be subject to the . . . 2003 Tree Preservation ordinance[1] . . . No Tree Preservation plan is approved for this MDP." No administrative appeal of the City's decision was taken.
In May 2006, Continental Homes, which is a wholly owned subsidiary of D.R. Horton, acquired part of the Kallison Ranch property from Lennar Homes and took over development of the land. In July 2006, Continental hired the Eggmeyer company to clear brush and trees from approximately 30 acres. Blaine Lopez, Continental's Vice President of Land Development, testified that he was familiar with the City's Tree Permit Ordinance but believed it did not apply in the extraterritorial jurisdiction ("ETJ"),[2] and therefore Continental did not apply for a tree permit prior to removing any protected trees. On July 12, 2006, a tree inspector for the City of San Antonio drove past the site on his way to another site and noticed big mulch piles and heavy equipment used for clearing large trees. After verifying that no tree permit had been issued for that site, he issued a "stop-work" order to the Eggmeyer superintendent at 5:45 p.m. that day. The superintendent told the tree inspector that he believed the City could not enforce its tree ordinance in the ETJ, and indicated they planned to continue with the job. The Eggmeyer crew continued working until 6:00 p.m., their usual stopping time.
Two days later, the City obtained a temporary restraining order. The City then filed a petition seeking a permanent injunction, civil penalties and mitigation based on the number of protected trees removed. Approximately one week after the temporary restraining order was granted, Continental reviewed the Pape-Dawson *13 file on the Kallison Ranch Project and found the Vested Rights Permit issued in 2002, stating that the project was vested back to 1991. All of the Continental representatives who testified agreed that this was the first time Continental knew about the Vested Rights Permit. When Continental answered the City's suit, it pled vested rights as an affirmative defense, asserting that it was entitled to develop the property under the ordinances in effect on the date of vesting, i.e., August 29, 1991; there was no tree preservation ordinance in effect on that date, and therefore Continental claimed it was exempt from the Tree Permit Ordinance. Continental also filed a counterclaim for declaratory relief as to its vested rights, asking the court to affirm its "right to develop the property under the ordinances in place as of August 29, 1991," and seeking recovery of its attorney's fees; a claim for wrongful injunction was later dropped. The City responded by pleading that any vested rights had expired or become dormant, and did not exempt compliance with the Tree Permit Ordinance. A temporary injunction was granted in July 2006.
In September 2006, a jury trial was held on the City's request for a permanent injunction, civil penalties and mitigation damages, and on Continental's counterclaim for declaratory relief and attorney's fees. The evidence was undisputed that the Kallison Ranch Project is located in the ETJ, the City issued the Vested Rights Permit for the project in March 2002, and Continental did not apply for a tree permit under the Tree Permit Ordinance before removing protected trees from the site.[3] The City argued at trial that any vested rights had become dormant due to lack of progress toward completion of the project, and, alternatively, that even if the vested rights were valid, Continental Homes was still required to comply with the "procedural" permitting requirements of the Tree Permit Ordinance because it did not impinge on "substantive" vested rights. Continental's position at trial was that the City could not enforce its Tree Permit Ordinance in the ETJ, and, alternatively, that the Vested Rights Permit exempted it from having to apply for, or obtain, a permit under the subsequently-enacted ordinance.
The jury answered the following four questions of fact as follows:
(1) Do you find the Kallison Ranch project became dormant after May 11, 1999?
Answer: No
(2) State in diameter inches the amount of significant or heritage trees removed from the property in question by Continental Homes, L.P. or its agents in excess of the percentages allowed by the City Code of San Antonio and the Tree Preservation ordinances of the City of San Antonio.
Answer: Significant trees: 29,947 diameter inches Heritage trees: 26,126 diameter inches
(3) What amount of a civil penalty should be assessed against Continental Homes, L.P.?
Answer: $15,743,000
(4) What is a reasonable fee for the necessary services of Continental Homes' attorneys in this case, and for expenses incurred, stated in dollars and cents, if any?
Answer: $134,000 for preparation and trial; $10,000 for an appeal to the *14 Court of Appeals; $5,000 for an appeal to the Supreme Court of Texas.
Each side moved for judgment on the jury's verdict, each asking the court to disregard certain jury findings. After a hearing, the trial court entered a final judgment in favor of the City, granting a permanent injunction prohibiting Continental from removing any trees without first complying with the Tree Permit Ordinance, and ordering Continental to make mitigation by replanting replacement trees; the court entered a take-nothing judgment on Continental's counterclaim for declaratory relief as to its vested rights. The trial court adopted the jury's finding as to the number of protected trees removed. The court disregarded the jury's finding that Continental's vested rights were not dormant as "immaterial," disregarded the jury's award of the $15 million civil penalty as unauthorized because the violation occurred in the ETJ, and disregarded the award of attorney's fees to Continental as immaterial to the judgment rendered. Further, the trial court made its own findings of fact and conclusions of law in support of its final judgment, concluding that any vested rights were waived because Continental and its predecessor did not administratively appeal the City's conditional approval of the Master Development Plan (MDP # 838) for the Kallison Ranch Project, which stated the plan was "subject to" the Tree Permit Ordinance. The court further concluded that the Tree Permit Ordinance was enforceable in the ETJ as a matter of law, and thus Continental was required to, but did not, obtain a tree permit. Continental timely appealed, and the City cross-appealed.[4]

ANALYSIS
On appeal, Continental Homes raises five issues: (1) the trial court erred in basing its judgment on its own findings of fact and conclusions of law holding Continental's vested rights were waived, in part because the City never pled waiver; (2) application of the Tree Permit Ordinance is contrary to state law and breaches a previous agreement between the landowners and the City; (3) the trial court erred in rendering judgment against Continental without taking into account amendments made to the Tree Permit Ordinance after trial but before rendition of judgment; (4) by requiring Continental to expend millions of dollars replanting trees, the court effectively assessed a civil penalty for a violation occurring in the ETJ, for which it has no authority; and (5) the trial court erred because the City is not entitled to enforce its Tree Permit Ordinance in the ETJ. We begin our analysis by addressing the first issue concerning waiver of Continental's vested rights.

Waiver of the Vested Rights
In its first issue, Continental Homes asserts, in part, that the trial court erred in rendering judgment for the City based on the affirmative defense of waiver, which was neither pled nor tried by consent.[5] Specifically, the judgment includes *15 the following findings of fact relevant to waiver made by the trial court:
No. 3 In August 2005, the City of San Antonio approved MDP # 838 with the condition that MDP #838 was subject to the City of San Antonio's Tree Preservation Ordinance. The City of San Antonio specifically rejected the "Master Tree Stand Delineation" submitted by Pape-Dawson Engineers.
No. 4 Despite the availability of administrative appeals under the applicable City of San Antonio ordinances for the owners of the property to challenge the imposition of the condition that approval of MDP # 838 was conditioned on compliance with the Tree Preservation Ordinance, no appeal was ever made by the prior owners of the property.
No. 5 Continental Homes of Texas, L.P. acquired title to the property subject to MDP # 838 in May 2006. No administrative appeal of the conditions imposed as part of the approval of MDP # 838 was ever initiated by Continental Homes of Texas, L.P. when it took over development of the Kallison Ranch Project.
The judgment also contains Conclusion of Law No. 2 as to waiver, which states:
At the time MDP # 838 was conditionally approved by the City of San Antonio, Continental Homes of Texas, L.P.'s predecessor had administrative remedies available to it to appeal the conditions that were imposed, see e.g. UNIFIED DEVELOPMENT CODE §§ 35.412(d); 35.712(d), and the failure to appeal resulted, as a matter of law, in a waiver of any vested rights that were affected by the conditional approval of MDP # 838. Compare Fincher v. Board of Adjustment of the City of Hunters Village, 56 S.W.3d 815 (Tex.App.-Houston [1st Dist.] 2001, no pet.).
Waiver is "an intentional relinquishment of a known right or intentional conduct inconsistent with claiming that right." Sun Exploration & Prod. Co. v. Benton, 728 S.W.2d 35, 37 (Tex.1987). It is an affirmative defense that must be specifically pled. TEX.R. CIV. P. 94; T.O. Stanley Boot Co. v. Bank of El Paso, 847 S.W.2d 218, 223 (Tex. 1992). Likewise, failure to exhaust administrative remedies is an affirmative defense that must be pled. ABT Galveston Ltd. P'ship v. Galveston Cent. Appraisal Dist., 137 S.W.3d 146, 151 (Tex.App.-Houston [1st Dist.] 2004, no pet.). Failure to plead an affirmative defense generally waives it. Shoemake v. Fogel, Ltd., 826 S.W.2d 933, 937 (Tex. 1992); Komet v. Graves, 40 S.W.3d 596, 602 (Tex.App.-San Antonio 2001, no pet.). Further, the trial court's judgment must conform to the pleadings of the parties. TEX.R. CIV. P. 301; In re D.G.R., No. 04-05-00439-CV, 2006 WL 3611156, at *3 (Tex.App.-San Antonio Dec.13, 2006, no pet.) ("a party may not obtain a judgment on a theory not pleaded").
It is clear from the record, and the City concedes, that the affirmative defense of waiver based on failure to appeal the conditional approval of MDP # 838 was never pled by the City. In an attempt to uphold the judgment, the City argues that the issue of waiver was tried by consent, and *16 thus "the lack of pleading waiver does not overcome the trial court's finding of waiver." The City also contends that waiver based on failure to administratively appeal is a "pure question of law," which could properly be determined by the court based on the undisputed evidence introduced at trial without objection. In support, the City cites the testimony of Roderick Sanchez, Assistant Director of Land Development for the City, that he wrote the letter to Pape-Dawson Engineers stating that the Kallison Ranch Project MDP was approved "subject to" the Tree Permit Ordinance; that no one came back on behalf of the project and said they had vested rights; there is a process by which they could have objected and then appealed if the City refused to acknowledge a claim of vested rights, but that was not done.
An unpleaded issue may be deemed tried by consent when evidence is developed under circumstances indicating both parties understood the issue was in the case, and no complaint was made. TEX.R. CIV. P. 67; Frazier v. Havens, 102 S.W.3d 406, 411 (Tex.App.-Houston [14th Dist.] 2003, no pet.). To determine whether an issue was tried by consent, an appellate court must examine the record for evidence of the trial of the issue, not just admission of evidence on the issue. Case Corp. v. Hi-Class Bus. Sys. of Am., Inc., 184 S.W.3d 760, 771 (Tex.App.-Dallas 2005, pet. denied); Stephanz v. Laird, 846 S.W.2d 895, 901 (Tex.App.-Houston [1st Dist.] 1993, writ denied). Issues are not "tried" merely by the receipt of evidence on the issue. Sage Street Assocs. v. Northdale Const. Co., 863 S.W.2d 438, 446 (Tex.1993). Additionally, the doctrine of trial by implied consent generally does not apply if the evidence related to the issue is also relevant to other issues raised by the pleadings. Case Corp., 184 S.W.3d at 771. If an issue is deemed tried by consent, it is treated as if it had been raised in the pleadings. Mastin v. Mastin, 70 S.W.3d 148, 154 (Tex.App.-San Antonio 2001, no pet.).
Here, while Sanchez's testimony was admitted without objection and did touch on the absence of an administrative appeal, it also related to other relevant issues in the case such as dormancy of the Kallison Ranch Project, Continental's and Lennar's knowledge of the Vested Rights Permit, and Continental's knowledge or lack of knowledge of the City's letter imposing the Tree Permit Ordinance condition on the MDP. Further, even though this evidence was relevant to waiver, the City never argued a waiver theory during its opening and closing arguments, never asserted it during the course of trial, and never sought to amend its pleadings to include it after the evidence was received. In fact, the record is clear that the City consistently had two trial theories  that the Vested Rights Permit had become dormant, and, alternatively, even if it was valid it did not exempt the developer from having to apply for a tree permit. Thus, even though evidence relevant to the absence of an administrative appeal was admitted without objection, the record clearly shows that waiver through failure to administratively appeal was not tried as an issue in the case. See Case Corp., 184 S.W.3d at 771; Stephanz, 846 S.W.2d at 901.
The record reveals that the first time a waiver theory was raised by the City was at the post-verdict hearing on the parties's competing motions to enter judgment. At that hearing, the City argued for the first time that because Continental and its predecessor did not assert vested rights at the time the MDP was approved "subject to" the Tree Permit Ordinance, it had waived them. The City argued that section 35-412(d)(2) of the Unified Development Code *17 gave the developer the right to administratively appeal the City's conditional approval of MDP #838 to the City Planning Commission within 30 days, and that its failure to undertake such an appeal waived any vested rights with respect to the Tree Permit Ordinance. See § 35-412(d)(2), UNIFIED DEVELOPMENT CODE. Continental asserted at the hearing that the only defensive issues pled by the City were that the vested rights had expired or become dormant, and did not exempt compliance with the Tree Permit Ordinance; thus, the City's failure to plead waiver precluded entry of judgment on that ground. After the trial court signed the final judgment containing its findings and conclusions of law on waiver, Continental filed a motion for new trial arguing, in part, that the judgment was erroneous because the affirmative defense of waiver had not been pled by the City. Continental asserts on appeal that it was deprived of due process because it had no notice that waiver through failure to exhaust administrative remedies was an issue in the case until weeks after the jury verdict. We agree that the record does not support a finding that waiver was tried by consent.
Finally, at oral argument, the City contended that the judgment is not really based on waiver, but rather on the court's other conclusions of law that the Tree Permit Ordinance applies in the ETJ as a matter of law, and that Continental Homes failed to obtain a tree permit as required by the ordinance and MDP # 838. However, the plain language of the judgment shows that as a whole it is based on the court's conclusion that the failure by Continental, and its predecessor, to pursue an administrative appeal of the City's conditional approval of MDP # 838 waived any vested rights affected by MDP #838; therefore, under the Tree Permit Ordinance, Continental was required to obtain a tree permit and its failure to do so violated the MDP. The trial court's verbal ruling at the conclusion of the hearing on the motions to enter judgment confirms that reading of the written judgment. The court stated in part, "I do think that the City of San Antonio accepted the master development plan subject to a 2003 Tree Preservation Ordinance, which I think then makes [Local Government Code section] 212 operative. And so I think you had to get a permit to do this. And there was no appeal of the vested rights as to the 2003 Tree Ordinance, so then, therefore, the master development plan was violated." We therefore reject the City's contention that the trial court's judgment is not based on the court's finding that Continental's vested rights were waived.
Because the record clearly shows that the City never pled waiver through failure to administratively appeal as an affirmative defense, and the waiver issue was not tried by consent, the trial court's judgment, which is based on waiver of Continental's vested rights, cannot stand. See Compass Bank v. MFP Fin. Servs., Inc., 152 S.W.3d 844, 851 (Tex.App.-Dallas 2005, pet. denied) (if affirmative defense is not pled or tried by consent, it is waived, and trial court in non-jury trial has no authority to make a fact finding on that issue).[6]

Applicability of Tree Permit Ordinance in View of Vested Rights
Having concluded that the trial court's finding that Continental's vested rights were waived cannot stand, we next address whether, given its existing vested rights, Continental was nevertheless required *18 to comply with the Tree Permit Ordinance as contended by the City.
Continental asserts that its Vested Rights Permit wholly exempts it from having to apply for and obtain a permit under the Tree Permit Ordinance because section 245.002 prohibits the City from enforcing ordinances that are enacted after rights have vested. TEX. LOC. GOV'T CODE ANN. § 245.002 (Vernon 2005). It further contends the language of the Tree Permit Ordinance itself shows it does not apply to the Kallison Ranch Project. Relying on FM Props. Operating Co. v. City of Austin, the City replies that a landowner or developer is not entitled to determine for itself what laws apply, and therefore Continental is required to comply with the Tree Permit Ordinance even if it has vested rights. See FM Properties Operating Co. v. City of Austin, 22 S.W.3d 868, 879-80 (Tex.2000) (holding law authorizing private landowners to exempt themselves from municipal water regulations was unconstitutional delegation of legislative power that could adversely affect public interest in water quality). The City also asserts the permit requirement imposed by the ordinance is "wholly procedural" and does not impair a substantive vested right; therefore, the ordinance can be applied retroactively. See Subaru of Am., Inc. v. David McDavid Nissan, Inc., 84 S.W.3d 212, 219 (Tex.2002) (retroactive statute is unconstitutional only if it "takes away or impairs vested rights acquired under existing law," and procedural statutes typically do not affect vested rights). Further, the City argues MDP # 838 was approved "subject to" the Tree Permit Ordinance, and the express language of the ordinance requires a permit before any removal of protected trees  without exception. See § 35-477, UNIFIED DEVELOPMENT CODE.
Section 245.002 of the Local Government Code recognizes vested rights. Specifically, it requires a regulatory agency to consider an application for a permit solely based on the regulations and ordinances in effect at the time the original application for permit is filed for review for any purpose. TEX. LOC. GOV'T CODE ANN. § 245.002(a), (b) (Vernon 2005). This Court has recently held that rights vest in a particular project, not the land, and are not affected by a subsequent conveyance of the property. City of San Antonio v. En Seguido, Ltd., 227 S.W.3d 237, 242-43 (Tex.App.-San Antonio 2007, no pet.). Thus, Continental is entitled to the benefit of the Vested Rights Permit obtained in 2002, prior to its acquisition of the property. It is undisputed that the Vested Rights Permit was obtained prior to the effective date of the 2003 version of the Tree Permit Ordinance at issue in this case.
We next turn to the applicability language of the provisions of the Tree Permit Ordinance itself. Section 35-477 of the Unified Development Code, entitled "Tree Permits," states as follows:
(a) Applicability
The provisions of this section apply to any activity subject to the tree preservation standards.
(b) Initiation
(1) Application to City Arborist
A valid application for permit must be filed and approved with the city arborist before:
A. Mitigating, removing, or destroying any significant or heritage trees that are required to be counted for calculating minimum tree preservation percentages as provided in the tree preservation standards; or
B. Any person conducts a regulated activity, as defined in Subsection *19 (a) of § 35-523, on property subject to this section that may result in the removal or destruction of any such tree.
§ 35-477(a), (b)(1), UNIFIED DEVELOPMENT CODE (emphasis added). The "tree preservation standards" are outlined in section 35-523 of the Unified Development Code. Subsection (a)(1) of section 35-523, entitled "Applicability," provides in relevant part:
(a) Applicability
(1) Generally
A. The regulations contained in this division shall apply to any private property . . . that is not the subject of a permit as of the effective date of this provision. . . .
C. The regulations contained in this division shall regulate all activities that result or may result in the removal of significant or heritage trees as defined herein. Said activities include any of the following conducted on property to which the division applies . . . .
§ 35-523(a)(1), UNIFIED DEVELOPMENT CODE (emphasis added). The City's Unified Development Code also specifically adopts Chapter 245 of the Local Government Code, which recognizes vested rights. See § 35-712(g), (k), UNIFIED DEVELOPMENT CODE.
Based on the language and structure of this particular Tree Permit Ordinance, read in conjunction with section 245.002 of the Local Government Code, we agree with Continental Homes that the permit provisions of section 35-477 do not apply to the Kallison Ranch Project because, by virtue of the Vested Rights Permit which contains no conditions or expiration, the project is not "subject to" the Ordinance's tree preservation standards. Therefore, because the Tree Permit Ordinance, as drafted, simply does not apply to this project, we need not determine whether the ordinance's permit process is purely procedural, as the City contends, or affects substantive vested rights, as Continental contends.

Continental's Request for Declaratory Judgment and Attorney's Fees
Finally, we address whether the trial court erred in denying Continental's counterclaim for declaratory relief as to its vested rights to develop the Kallison Ranch Project and for recovery of its attorney's fees. The trial court denied Continental's claim for a declaratory judgment, and disregarded the jury's award of attorney's fees as immaterial. On appeal, Continental asserts that it is entitled to declaratory relief as to its vested rights, and to recovery of attorney's fees in the amounts found by the jury, i.e., $134,000 for trial plus $15,000 in conditional appellate fees.
At trial and on appeal, the City has stressed that it does not concede that Continental Homes has valid, existing vested rights to develop the Kallison Ranch Project. The trial evidence, however, was undisputed that the City issued a Vested Rights Permit on March 15, 2002, providing that the project has vested rights as of August 29, 1991; the permit itself was introduced into evidence. The City attempted to defeat the Vested Rights Permit at trial by arguing it had either expired or become dormant. As noted, the Vested Rights Permit contains no expiration date, and the jury declined to find the project had become dormant.[7] On appeal, the City argues that the declaratory judgment *20 action is not ripe because there is no actual controversy, is not proper because vested rights were asserted as a defense not an affirmative claim, and is merely being used by Continental as a vehicle to recover its attorney's fees. We address each argument in turn.
The City first asserts that Continental's request for declaratory relief as to its vested rights is premature, or "not ripe," because "the City has never been asked to evaluate a permit in which such rights were asserted and therefore has neither approved nor denied a permit in which such rights were claimed." Essentially, the City argues that because Continental never applied for a tree permit under the Tree Permit Ordinance, and consequently never asserted its vested rights in connection with such a permit application, there is no actual, justiciable controversy. See Bonham State Bank v. Beadle, 907 S.W.2d 465, 467 (Tex.1995) (declaratory judgment is appropriate only if there is a justiciable controversy about the rights and status of the parties and the declaration will resolve the controversy); see also City of Helotes v. Miller, 243 S.W.3d 704, 708 (Tex.App.-San Antonio 2007, no pet.) ("ripeness emphasizes the need for a concrete injury for a justiciable claim to be presented," and a claim is "not ripe if its resolution depends on contingent or hypothetical facts, or upon events not yet come to pass").
Given our conclusion that the Tree Permit Ordinance, as drafted, does not apply to the Kallison Ranch Project, the fact that there has been no permit application, and thus no ruling by the City, is inapposite. The record is clear that the City itself approved and issued the Vested Rights Permit in March 2002; it is equally clear that, in the context of the development of the Kallison Ranch Project, the City refuses to recognize the validity of the Vested Rights Permit. Continental Homes is attempting to develop the Kallison Ranch Project, and has made it clear that it intends to proceed with its development plans upon resolution of this lawsuit. Thus, an actual controversy exists between the City and Continental Homes concerning whether Continental has vested rights to develop the Kallison Ranch Project under the ordinances in effect as of August 29, 1991  this dispute extends beyond the removal of protected trees without a permit. Continental's counterclaim seeks recognition of its vested rights and an acknowledgment that all future development of the Kallison Ranch Project is governed by the ordinances in effect on August 29, 1991. See BHP Petroleum Co. v. Millard, 800 S.W.2d 838, 842 (Tex.1990) (defensive declaratory judgment counterclaim that has greater ramifications than original suit is proper). We rejected a similar ripeness argument by the City in City of Helotes v. Miller, and we likewise reject the argument here. See City of Helotes, 243 S.W.3d at 708-09 (rejecting city's argument that landowner's claim was not ripe because no permit had been issued or denied); c.f., Save Our Springs Alliance v. City of Austin, 149 S.W.3d 674, 683-84 (Tex.App.-Austin 2004, no pet.) (holding controversy was not ripe in absence of facts showing city had applied its land-use regulations in the particular case). Continental's counterclaim for declaratory relief as to its vested rights is not premature because in the current suit the City is applying the Tree Permit Ordinance to the project  application of the ordinance is not merely hypothetical; moreover, the validity of Continental's claim of vested rights extends beyond the current dispute over application of the Tree Permit Ordinance.
Next, the City contends that Continental's counterclaim for a declaratory judgment as to its vested rights is not *21 an appropriate claim for affirmative relief, but merely a defense to liability in response to the City's suit. Continental pled vested rights as a defense to the City's suit, but then separately asserted vested rights when it later filed its counterclaim for declaratory relief that it was entitled "to develop the Kallison Ranch Project under the ordinances in place as of August 29, 1991." "To qualify as a claim for affirmative relief, a defensive pleading must allege that the defendant has a cause of action, independent of the plaintiff's claim, on which he could recover benefits, compensation or relief, even though the plaintiff may abandon his cause of action or fail to establish it." BHP Petroleum, 800 S.W.2d at 841. In its counterclaim, Continental is not merely seeking a ruling of non-liability, or restating its vested rights defense in the form of a declaratory judgment action. See id. Rather, the requested declaratory relief reaches beyond the pending suit to future events arising out of the ongoing and continuing relationship between the parties due to the continued development of the project. See id. at 841-42 (recognizing that a defensive declaratory judgment may present issues beyond those raised by the plaintiff); see also Winslow v. Acker, 781 S.W.2d 322, 328 (Tex.App.-San Antonio 1989, writ denied) ("when a declaratory judgment counterclaim has greater ramifications than the original suit, the court may allow the counterclaim"). Continental's declaratory judgment counterclaim is an independent cause of action for affirmative relief that has greater ramifications than the City's suit to prohibit further tree removal; the declaratory judgment would have the effect of "settling all future disputes" as to the vested rights to develop the Kallison Ranch Project. See BHP Petroleum, 800 S.W.2d at 842.
Finally, the City asserts that Continental cannot use a declaratory judgment action to obtain attorney's fees "merely for resisting the plaintiff's right to recover." See Bexar County Appraisal Review Bd. v. First Baptist Church, 846 S.W.2d 554, 561 (Tex.App.-San Antonio 1993, writ denied) (litigant may not seek declaratory judgment in existing suit simply to recover attorney's fees that are otherwise not authorized by statute). We have determined that Continental's counterclaim is a permissible claim for declaratory relief; thus, it is entitled to recover its attorney's fees as pled and proved at trial. TEX. CIV. PRAC. & REM.CODE ANN. § 37.009 (Vernon 1997); City of Dallas v. GTE Southwest, Inc., 980 S.W.2d 928, 939 (Tex.App.-Fort Worth 1998, pet. denied).
Having found that Continental's declaratory judgment action is proper and ripe, we conclude that, based on the undisputed evidence that the City issued a Vested Rights Permit for the Kallison Ranch Project providing that the right to develop the project is vested as of August 29, 1991, Continental Homes is entitled to recover on its counterclaim for declaratory relief and to recover its attorney's fees in the amounts awarded by the jury.[8]

CONCLUSION
Based on the foregoing analysis, we reverse the trial court's judgment granting a permanent injunction against Continental Homes and ordering mitigation of the removed trees, and render a take-nothing *22 judgment against the City of San Antonio. In addition, we grant Continental's request for declaratory relief and render a declaratory judgment that Continental Homes has the vested right to develop the Kallison Ranch Project under the ordinances in effect as of August 29, 1991, and award Continental its attorney's fees in the amounts found by the jury.
NOTES
[1]  In 1997, the City of San Antonio enacted a tree preservation ordinance for the first time, which instituted a permit requirement before certain protected trees could be removed. The ordinance was amended in 2003, which is the version at issue in this case. The 2003 ordinance is referred to herein as the "Tree Permit Ordinance."
[2]  The Kallison Ranch Project lies within the City of San Antonio's extraterritorial jurisdiction, or "ETJ," which is defined as "the unincorporated area that is contiguous to the corporate boundaries of the municipality and that is located . . . within five miles of those boundaries, in the case of a municipality with 100,000 or more inhabitants." TEX. LOC. GOV'T CODE ANN. § 42.021(a)(5) (Vernon 2008).
[3]  At the charge conference, Continental Homes stipulated that its agents had removed "significant" and "heritage" trees that would have been protected under the Tree Permit Ordinance, if it applied.
[4]  The City raised a single issue on cross-appeal, asserting the trial evidence conclusively established that the Kallison Ranch Project had become dormant, and therefore the judgment should be modified to reflect that Continental possesses no vested rights as a matter of law. The City withdrew its cross-appeal at oral argument; therefore, we need not determine whether the evidence "conclusively established" dormancy.
[5]  Within its first issue, Continental also asserts that it and its predecessor Lennar were not required to pursue an administrative appeal because the City's conditional approval of the MDP was a void attempt to retroactively impair or destroy its vested right to be free from such regulation; therefore, its failure to appeal cannot constitute waiver of its substantive rights. See TEX. CONST. art. 1, § 16; Corpus Christi People's Baptist Church, Inc. v. Nueces County Appraisal Dist., 904 S.W.2d 621, 626 (Tex. 1995) (retroactive law that destroys or impairs vested rights is invalid). Continental also contends the trial court erred in disregarding the jury's answer declining to find the project had become dormant. Given our resolution of the waiver issue, we need not reach these arguments.
[6]  We need not reach the broader question of whether the trial court had the authority to disregard the jury's findings and make its own sua sponte findings of fact. See TEX.R. CIV. P. 296.
[7]  The jury answered "No" when asked in Question No. 1 whether it found that the Kallison Ranch Project had become dormant. In rendering its judgment based on waiver of Continental's vested rights, the trial court disregarded the jury's answer on dormancy as immaterial.
[8]  Given our resolution of the above issues, we need not address Continental's remaining issues raised on appeal  whether the City may enforce the Tree Permit Ordinance in the ETJ; whether the trial court was required to consider the recent amendments to the Tree Permit Ordinance's mitigation standards; and whether mitigation is equivalent to a prohibited civil penalty for a violation in the ETJ.
